summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
Commit message (Collapse)AuthorAge
* Add ability to swap decal slotsyum2025-01-27
| | | | | | | | Also: * Rim lighting can disable texture normals * Frame counter is now hidden behind a checkbox, and unconditionally overrides audiolink
* Add LTCGI strength slideryum2025-01-22
|
* Tweak clearcoatyum2025-01-22
|
* Add some options to ds2_11 (terrain gimmick)yum2025-01-22
| | | | Also chase down the weird clearcoat bug.
* Clearcoat can disable texture normalsyum2025-01-21
| | | | | | | | | | | | | | | | | Also: * terrain gimmick * makes some hardcoded shit into params * add alternative normal evaluation methods * stochastic method gives best results without getting into analytic normals * add FBM noise texture slot to improve perf * add initial raytrace to sphere * stabilizes appearance as camera moves * add backtracking * eliminates sharp lines without sacrificing perf * fog 00 can render on a plane now, in addition to cylinder * add epilepsy protection filter
* Begin adding gimmicks for downstairs mapyum2024-12-30
| | | | | | | | | | | Included changes: * Update LTCGI includes * Add toggle to force world lighting * Unity fucking sucks dick and balls and doesn't set LIGHTMAP_ON consistently * Add some more sdfs for raymarching * Add separate LTCGI lighting mode for avatar vs. world
* More LTCGI cleanupyum2024-12-27
| | | | | | Debugging why shadowmap LTCGI emissions don't show up. This patch makes the shader match the appearance of the LTCGI surface shaders much more closely.
* Tweak LTCGI based on world experimentsyum2024-12-25
|
* Vertex lighting is now wrappedyum2024-12-17
| | | | | | | This is unconditional (for now). In VRChat, anything other than fully wrapped vertex lighting usually looks bad. Also add direct lighting to clearcoat.
* Fix clearcoatyum2024-12-16
|
* Fix smooth_minyum2024-12-10
| | | | | | | | | | The old smooth_min(x, k) had the properties smooth_min(1, k) = k smooth_min(inf, k) = 1 Now it's smooth_min(x, k, j) with the properties smooth_min(1, k, j) = k smooth_min(inf, k, j) = j
* Add multiply mode to pbr overlaysyum2024-11-26
|
* Add ACES filmic toggle to main shaderyum2024-11-18
|
* Add separate sliders for diffuse/direct lightingyum2024-11-09
|
* Add baked normals & ltcgi to fogyum2024-11-06
|
* Add fog normalsyum2024-11-04
| | | | | Uses iquilez's directional derivative model and a simplified lighting model. Lighting is evaluated at each sample.
* Add interleaved gradient noise cutout modeyum2024-11-03
| | | | Based on screen space uvs.
* Miscyum2024-11-03
| | | | | | * Add third HSV slot * Add ZTest enum * Fix bug where SSR mask keyword can be set when SSR is disabled
* Lots of tweaksyum2024-11-03
|
* hack: Apply interleaved gradient noise to direct lightyum2024-11-02
| | | | This minimizes color banding due to dim direct lighting
* idk why this was offyum2024-11-02
|
* Fog uses interleaved gradient noise instead of white noiseyum2024-11-02
| | | | | This lets us use a much higher step size before noise becomes too gross to look at.
* add water stuffyum2024-10-24
|
* Add toggle for unity fogyum2024-10-17
|
* Rework step size / densityyum2024-10-09
| | | | | Step size is now derived from density. Step size is reimagined as a "quality" multiplier.
* Avatar bugfixesyum2024-10-09
|
* Add emitter texture to fogyum2024-10-09
|
* Add fog parameters; add Unity fog to fwd/add passesyum2024-10-08
|
* Fix SSRyum2024-10-05
|
* Add audiolink chroma gimmickyum2024-10-04
| | | | | | | | | | Enable displaying chroma as a solid color on the base/forward pass and/or the outline pass. Also: * add optional mask for mochie reflection strength * update README with dev instructions
* World lighting bugfixesyum2024-09-28
| | | | Remove explicit world interpolators flag, fix specular reflections.
* Bugfixes & small tweaksyum2024-09-25
| | | | | | * UNITY_LIGHTING_COORDS no longer clashes with uv2 * Direct light is only sampled once in world mode * Overlay mask always uses most detailed mip map
* World lighting fixesyum2024-09-24
| | | | | | | | | | | | | | | | * Add channel selection for roughness and metallic textures * This lets u combine roughness & metallic into one texture * Add Bakery-compatible emission slot * Add compile-time toggle for brightness clamping * Add toggle for world interpolators * Add emission type dropdown (baked/realtime/none) * Switch to bilinear filtering for base PBR maps to match standard shader behavior * Add bugfixes for Mochie BRDF in world lighting mode * Rename _NormalTex to _BumpMap for compatibility with standard shader * World lighting mode uses Unity baked GI logic instead of normal world lighting logic * Use uv2 instead of lmuv for lightmap UVs
* Add shader inlining toolingyum2024-09-18
| | | | | This should solve the issue of Unity failing to fully recompile my fucking shader.
* Tweak cubemap codeyum2024-09-18
|
* Replace all instances of _WorldSpaceCameraPos with center eye posyum2024-09-12
| | | | Fixes left/right eye mismatch in VR.
* Add lit glitter logicyum2024-08-30
| | | | | Also fix prox dimming. It should occur *after* the non-specular brightness budget correction.
* Switch to SampleBias for everythingyum2024-08-24
| | | | Also add a global slider for it.
* Add second indirect specular lighting factoryum2024-08-22
| | | | First one is probably being used for animations. Second one is static.
* Add HSV, global emissions multiplieryum2024-08-19
| | | | Also bugfix overlays 1-3 ifdefs.
* Put lighting factors after clampyum2024-08-17
|
* Add proximity dimming featureyum2024-08-17
| | | | Also overhaul brightness clamping code. It now occurs in HSV space.
* Add metallic/roughness to decalsyum2024-08-10
| | | | | | | | Also add ability to limit cubemap override to metallic regions of material. Also rename `uv` to `uv0` where appropriate. This is to begin supporting multiple UV maps.
* Add second clearcoat mask, and add invert abilityyum2024-08-02
| | | | Also optimize by locking each behind a keyword.
* Implement stereo instancingyum2024-07-28
| | | | | | | | | | | Seems to fix VR flickering bug. Also: * Add vertex lighting factor * Remove clearcoat 10x factors * Lighting factors now affect clearcoat * Simplify `#pragma multi_compile` bits
* Switch to poi-style direct lightingyum2024-07-20
|
* Add second mask to matcapsyum2024-07-20
| | | | Useful for PBR overlay.
* Temporarily disable direct lighting in outlinesyum2024-07-18
|
* Add individual lighting multipliersyum2024-07-18
| | | | ... for direct, indirect x {specular,diffuse}
* Add lighting multiplier & reflection probe saturation controlyum2024-07-16
| | | | | | | | | | Also: * Shadow caster works with cutout now * Normalize interpolated mesh normal in fragment shader * Indirect specular affects clearcoat * Bugfix: rename v2f vertex to pos in tessellation shader * Hue shift affects outlines