Procházet zdrojové kódy

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

BearishSun před 8 roky
rodič
revize
5f65f6c23e
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  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)
 	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;
 		const static float DEFAULT_RESOLUTION = 512.0f;
 		
 		
 		// Increase bias if map size smaller than some resolution
 		// Increase bias if map size smaller than some resolution