Browse Source

Fix an issue with point lights after moving to 32bit shadow atlas

Panagiotis Christopoulos Charitos 1 year ago
parent
commit
f674730664
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AnKi/Shaders/LightFunctions.hlsl

+ 1 - 1
AnKi/Shaders/LightFunctions.hlsl

@@ -269,7 +269,7 @@ RF32 computeShadowFactorPointLightGeneric(PointLight light, Vec3 frag2Light, Tex
 {
 	const Vec3 dir = -frag2Light;
 	const Vec3 dirabs = abs(dir);
-	const F32 dist = max(dirabs.x, max(dirabs.y, dirabs.z));
+	const F32 dist = max(dirabs.x, max(dirabs.y, dirabs.z)) - 0.01; // Push it out to avoid artifacts
 
 	// 1) Project the dist to light's proj mat
 	//