diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-19 18:40:39 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-19 18:40:39 -0800 |
| commit | 0ef282da6a87c27e4056faaedb2847eed1f5a8a7 (patch) | |
| tree | 3eaf26a8216f0efc94edc1499e0ab9241b5aac83 /yum_lighting.cginc | |
| parent | f6e54271cddfec5ef16e986a94edf2db380bc458 (diff) | |
shadows now use pbr normal; reparameterize tesellation falloff
Diffstat (limited to 'yum_lighting.cginc')
| -rw-r--r-- | yum_lighting.cginc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yum_lighting.cginc b/yum_lighting.cginc index f3ccb46..a0a4a2e 100644 --- a/yum_lighting.cginc +++ b/yum_lighting.cginc @@ -309,11 +309,13 @@ float3 yumSH9(float4 n, float3 worldPos, inout YumLighting light) { #endif } -float4 getIndirectDiffuse(v2f i, float4 vertexLightColor, +float4 getIndirectDiffuse(v2f i, + float3 normal, + float4 vertexLightColor, inout YumLighting light) { float4 diffuse = vertexLightColor; #if defined(FORWARD_BASE_PASS) - diffuse.xyz += max(0, yumSH9(float4(i.normal, 0), i.worldPos, light)); + diffuse.xyz += max(0, yumSH9(float4(normal, 0), i.worldPos, light)); #endif return diffuse; } @@ -365,7 +367,7 @@ YumLighting GetYumLighting(v2f i, YumPbr pbr) { light.diffuse.gb = light.diffuse.r; #endif #else - light.diffuse = getIndirectDiffuse(i, float4(i.vertexLight, 0), light); + light.diffuse = getIndirectDiffuse(i, pbr.normal, float4(i.vertexLight, 0), light); light.occlusion = 1; #endif |
