Browse Source

Bugfix: Fixing shadow acne with larger directional shadow map cascades, due to precision/small bias

BearishSun 8 years ago
parent
commit
c57416a765

BIN
Data/Engine/Shaders/ShadowDepthCube.bsl.asset


BIN
Data/Engine/Shaders/ShadowDepthDirectional.bsl.asset


BIN
Data/Engine/Shaders/ShadowDepthNormal.bsl.asset


+ 1 - 4
Source/RenderBeast/BsShadowRendering.cpp

@@ -1879,10 +1879,7 @@ namespace bs { namespace ct
 			// Reduce the size of the transition region when the depth range is larger
 			float rangeScale = 1.0f / depthRange;
 
-			// Increase the size of the transition region for larger lights
-			float radiusScale = radius;
-
-			return DIR_LIGHT_SCALE * rangeScale * resolutionScale * radiusScale;
+			return DIR_LIGHT_SCALE * resolutionScale * rangeScale;
 		}
 		else
 			return fabs(light.getShadowBias()) * SPOT_LIGHT_SCALE;