diff options
| author | yum <yum.food.vr@gmail.com> | 2025-11-11 21:51:52 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-11-11 21:51:52 -0800 |
| commit | 5541fd799275b3ee21a2cdf26af87062e4080a8d (patch) | |
| tree | 4b2eca735d0fee2e947334c7ee0c2476ae922908 | |
| parent | 44b4cf78b7ac9607159d1aba6c08591f79d04944 (diff) | |
grrr more light tweaks
| -rw-r--r-- | lighting.cginc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lighting.cginc b/lighting.cginc index 0aacdc9..5a31a25 100644 --- a/lighting.cginc +++ b/lighting.cginc @@ -159,7 +159,7 @@ void GetLighting(v2f i, Pbr pbr, out LightData data) { float3 view_dir = normalize(i.eyeVec.xyz); - data.common.V = view_dir; + data.common.V = -view_dir; data.common.N = pbr.normal; data.common.NoV = saturate(dot(pbr.normal, data.common.V)); #if defined(_CLEARCOAT) @@ -202,7 +202,7 @@ void GetLighting(v2f i, Pbr pbr, out LightData data) { data.indirect.double_LoV = saturate(2.0f * indirect_LoV * indirect_LoV - 1.0f); data.indirect.diffuse = getIndirectDiffuse(i, pbr, data.indirect); - data.indirect.specular = getIndirectSpecular(i, pbr.roughness, view_dir, data.indirect.dir); + data.indirect.specular = getIndirectSpecular(i, pbr.roughness, view_dir, -data.indirect.dir); #if defined(_CLEARCOAT) data.indirect.specular_cc = getIndirectSpecular(i, pbr.cc_roughness, view_dir, dir_cc); #if defined(_CLEARCOAT_MASK) |
