diff options
author | Graham Linden <graham@lindenlab.com> | 2019-03-12 10:18:52 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-03-12 10:18:52 -0700 |
commit | 4f724f63049e53b9c223c7665e7e5d2344adff0e (patch) | |
tree | ee035518ddecb2f1ef59fea51509f4713ab152ad /indra | |
parent | b5bcba51b26f059b96cdb122b877fefad1e24e5c (diff) |
SL-10732
Fix accum of shadow weights and handling of clipped areas in spot shadow sampling.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index c927c4bf06..6ff49c7dac 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -161,7 +161,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) { - float shadow = 1.0f; + float shadow = 0.0f; pos += norm * spot_shadow_offset; vec4 spos = vec4(pos,1.0); @@ -194,6 +194,10 @@ float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) shadow /= weight; } + else + { + shadow = 1.0f; + } return shadow; } |