diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/shaders/nodes_shader/opengl_fragment.glsl | 3 | ||||
-rw-r--r-- | client/shaders/object_shader/opengl_fragment.glsl | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/client/shaders/nodes_shader/opengl_fragment.glsl b/client/shaders/nodes_shader/opengl_fragment.glsl index d3194090c..55c3feac7 100644 --- a/client/shaders/nodes_shader/opengl_fragment.glsl +++ b/client/shaders/nodes_shader/opengl_fragment.glsl @@ -187,6 +187,9 @@ float getPenumbraRadius(sampler2D shadowsampler, vec2 smTexCoord, float realDist if (PCFBOUND == 0.0) return 0.0; // Return fast if sharp shadows are requested + if (PCFBOUND == 0.0) + return 0.0; + if (SOFTSHADOWRADIUS <= 1.0) { perspectiveFactor = getDeltaPerspectiveFactor(baseLength); return max(2 * length(smTexCoord.xy) * 2048 / f_textureresolution / pow(perspectiveFactor, 3), SOFTSHADOWRADIUS); diff --git a/client/shaders/object_shader/opengl_fragment.glsl b/client/shaders/object_shader/opengl_fragment.glsl index 0dcbbd321..3cbf4347a 100644 --- a/client/shaders/object_shader/opengl_fragment.glsl +++ b/client/shaders/object_shader/opengl_fragment.glsl @@ -181,6 +181,9 @@ float getPenumbraRadius(sampler2D shadowsampler, vec2 smTexCoord, float realDist float perspectiveFactor; // Return fast if sharp shadows are requested + if (PCFBOUND == 0.0) + return 0.0; + if (SOFTSHADOWRADIUS <= 1.0) { perspectiveFactor = getDeltaPerspectiveFactor(baseLength); return max(2 * length(smTexCoord.xy) * 2048 / f_textureresolution / pow(perspectiveFactor, 3), SOFTSHADOWRADIUS); |