mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Fix shadow mapping when PCF is disabled (#11888)
This commit is contained in:
parent
e030d9cff0
commit
835524654e
@ -185,6 +185,7 @@ float getPenumbraRadius(sampler2D shadowsampler, vec2 smTexCoord, float realDist
|
|||||||
float baseLength = getBaseLength(smTexCoord);
|
float baseLength = getBaseLength(smTexCoord);
|
||||||
float perspectiveFactor;
|
float perspectiveFactor;
|
||||||
|
|
||||||
|
if (PCFBOUND == 0.0) return 0.0;
|
||||||
// Return fast if sharp shadows are requested
|
// Return fast if sharp shadows are requested
|
||||||
if (SOFTSHADOWRADIUS <= 1.0) {
|
if (SOFTSHADOWRADIUS <= 1.0) {
|
||||||
perspectiveFactor = getDeltaPerspectiveFactor(baseLength);
|
perspectiveFactor = getDeltaPerspectiveFactor(baseLength);
|
||||||
|
Loading…
Reference in New Issue
Block a user