diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl
index c927c4bf06913abe569ea3d578e39e961ad2988a..6ff49c7dacb45dbb1ec29371e79cb1a5e635b144 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;
 }