diff options
| author | yum <yum.food.vr@gmail.com> | 2024-11-04 16:28:58 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-11-04 16:32:29 -0800 |
| commit | 88e674850f6eae56ea8cac2d735efad4518f0a14 (patch) | |
| tree | 20d20a0455b02088d7add36b90500c909fc64f70 /tooner_lighting.cginc | |
| parent | 12e8a5cbd170ddf35c189dea193b2e9ca9245c81 (diff) | |
Add fog normals
Uses iquilez's directional derivative model and a simplified lighting
model. Lighting is evaluated at each sample.
Diffstat (limited to 'tooner_lighting.cginc')
| -rw-r--r-- | tooner_lighting.cginc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc index d9200de..8723f17 100644 --- a/tooner_lighting.cginc +++ b/tooner_lighting.cginc @@ -2398,7 +2398,10 @@ float4 effect(inout v2f i, out float depth) Fog00PBR pbr = getFog00(i); albedo = pbr.albedo; depth = pbr.depth; - diffuse_contrib += pbr.diffuse; +#if defined(_RENDERING_TRANSPARENT) || defined(_RENDERING_TRANSCLIPPING) + albedo.rgb *= albedo.a; +#endif + return albedo; } #endif #if defined(_GIMMICK_AURORA) |
