diff options
author | x2048 <codeforsmile@gmail.com> | 2022-01-02 22:45:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 13:45:55 -0800 |
commit | 835524654ed95afd1c5584c398a78ac226d0f27e (patch) | |
tree | f0458613e85f1d23543ef4314a784dba266ee6e6 /client/shaders | |
parent | e030d9cff08636a3c9ed301efb5e35b7642ac166 (diff) | |
download | minetest-835524654ed95afd1c5584c398a78ac226d0f27e.tar.gz minetest-835524654ed95afd1c5584c398a78ac226d0f27e.tar.bz2 minetest-835524654ed95afd1c5584c398a78ac226d0f27e.zip |
Fix shadow mapping when PCF is disabled (#11888)
Diffstat (limited to 'client/shaders')
-rw-r--r-- | client/shaders/nodes_shader/opengl_fragment.glsl | 1 |
1 files changed, 1 insertions, 0 deletions
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); |