Kaynağa Gözat

Bugfix: Tweaked default shadow depth bias factors in order to reduce the amount of "peter panning"

BearishSun 8 yıl önce
ebeveyn
işleme
5f65f6c23e
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      Source/RenderBeast/BsShadowRendering.cpp

+ 3 - 3
Source/RenderBeast/BsShadowRendering.cpp

@@ -1822,9 +1822,9 @@ namespace bs { namespace ct
 
 	float ShadowRendering::getDepthBias(const Light& light, float radius, float depthRange, UINT32 mapSize)
 	{
-		const static float RADIAL_LIGHT_BIAS = 0.005f;
-		const static float SPOT_DEPTH_BIAS = 0.1f;
-		const static float DIR_DEPTH_BIAS = 5.0f;
+		const static float RADIAL_LIGHT_BIAS = 0.00005f;
+		const static float SPOT_DEPTH_BIAS = 0.01f;
+		const static float DIR_DEPTH_BIAS = 0.5f;
 		const static float DEFAULT_RESOLUTION = 512.0f;
 		
 		// Increase bias if map size smaller than some resolution