summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-12 10:18:52 -0700
committerGraham Linden <graham@lindenlab.com>2019-03-12 10:18:52 -0700
commit4f724f63049e53b9c223c7665e7e5d2344adff0e (patch)
treeee035518ddecb2f1ef59fea51509f4713ab152ad /indra/newview/app_settings/shaders
parentb5bcba51b26f059b96cdb122b877fefad1e24e5c (diff)
SL-10732
Fix accum of shadow weights and handling of clipped areas in spot shadow sampling.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl6
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;
}