Make area beyond far split of directional light unshadowed again.
meow-7.2.2
Graham Linden 2019-02-08 13:59:13 -08:00
parent 290c2bda55
commit 1bbf62652c
1 changed files with 5 additions and 2 deletions

View File

@ -151,13 +151,16 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
shadow /= weight;
}
else
{
return 1.0f; // lit beyond the far split...
}
return shadow;
}
float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen)
{
float shadow = 0.0f;
float shadow = 1.0f;
pos += norm * spot_shadow_offset;
vec4 spos = vec4(pos,1.0);