mirror of
https://github.com/minetest/minetest.git
synced 2025-07-03 08:20:23 +02:00
Fix shadow rendering with filtering disabled
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user