diff options
| -rwxr-xr-x | lighting.cginc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lighting.cginc b/lighting.cginc index 04cff3c..f7fae86 100755 --- a/lighting.cginc +++ b/lighting.cginc @@ -207,7 +207,9 @@ float4 getIndirectDiffuse(v2f i, Pbr pbr, inout LightData light) { light.indirect.L01g, light.indirect.L01b ); - float3 dom_dir = normalize(mul(mat, diffuse.xyz)); + // Multiply unit vector by L1 matrix to get vector pointing in direction of + // light. + float3 dom_dir = normalize(mul(mat, float3(1,1,1))); float light_amount = dot(dom_dir, pbr.normal); float3 shadow_color = lerp( _Shadow_0_Color.rgb, |
