Fix shadow mapping when PCF is disabled (#11888)

This commit is contained in:
x2048 2022-01-02 22:45:55 +01:00 committed by GitHub
parent e030d9cff0
commit 835524654e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);