mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Fix shadow rendering with filtering disabled
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user