From 835524654ed95afd1c5584c398a78ac226d0f27e Mon Sep 17 00:00:00 2001 From: x2048 Date: Sun, 2 Jan 2022 22:45:55 +0100 Subject: Fix shadow mapping when PCF is disabled (#11888) --- client/shaders/nodes_shader/opengl_fragment.glsl | 1 + 1 file changed, 1 insertion(+) (limited to 'client/shaders') diff --git a/client/shaders/nodes_shader/opengl_fragment.glsl b/client/shaders/nodes_shader/opengl_fragment.glsl index b4a605b28..9ee88eb39 100644 --- a/client/shaders/nodes_shader/opengl_fragment.glsl +++ b/client/shaders/nodes_shader/opengl_fragment.glsl @@ -185,6 +185,7 @@ float getPenumbraRadius(sampler2D shadowsampler, vec2 smTexCoord, float realDist float baseLength = getBaseLength(smTexCoord); float perspectiveFactor; + if (PCFBOUND == 0.0) return 0.0; // Return fast if sharp shadows are requested if (SOFTSHADOWRADIUS <= 1.0) { perspectiveFactor = getDeltaPerspectiveFactor(baseLength); -- cgit v1.2.3