aboutsummaryrefslogtreecommitdiff
path: root/client/shaders/object_shader/opengl_fragment.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'client/shaders/object_shader/opengl_fragment.glsl')
-rw-r--r--client/shaders/object_shader/opengl_fragment.glsl6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/shaders/object_shader/opengl_fragment.glsl b/client/shaders/object_shader/opengl_fragment.glsl
index 9a0b90f15..3390e7227 100644
--- a/client/shaders/object_shader/opengl_fragment.glsl
+++ b/client/shaders/object_shader/opengl_fragment.glsl
@@ -351,7 +351,11 @@ void main(void)
vec3 posLightSpace = getLightSpacePosition();
#ifdef COLORED_SHADOWS
- vec4 visibility = getShadowColor(ShadowMapSampler, posLightSpace.xy, posLightSpace.z);
+ vec4 visibility;
+ if (cosLight > 0.0)
+ visibility = getShadowColor(ShadowMapSampler, posLightSpace.xy, posLightSpace.z);
+ else
+ visibility = vec4(1.0, 0.0, 0.0, 0.0);
shadow_int = visibility.r;
shadow_color = visibility.gba;
#else