Skip to content
Snippets Groups Projects
Commit 1bbf6265 authored by Graham Linden's avatar Graham Linden
Browse files

SL-10457

Make area beyond far split of directional light unshadowed again.
parent 290c2bda
No related branches found
No related tags found
No related merge requests found
...@@ -151,13 +151,16 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) ...@@ -151,13 +151,16 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen)
shadow /= weight; shadow /= weight;
} }
else
{
return 1.0f; // lit beyond the far split...
}
return shadow; return shadow;
} }
float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen)
{ {
float shadow = 0.0f; float shadow = 1.0f;
pos += norm * spot_shadow_offset; pos += norm * spot_shadow_offset;
vec4 spos = vec4(pos,1.0); vec4 spos = vec4(pos,1.0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment