diff options
Diffstat (limited to 'client/shaders/object_shader/opengl_fragment.glsl')
-rw-r--r-- | client/shaders/object_shader/opengl_fragment.glsl | 3 |
1 files changed, 3 insertions, 0 deletions
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); |