From d7f6bfa0c367b468decb00bf060801a36be5f4b4 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Tue, 14 Jan 2025 20:22:47 +0000 Subject: [PATCH] Use larger epsilon for ray traces --- KeepersCompound.Lightmapper/LightMapper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KeepersCompound.Lightmapper/LightMapper.cs b/KeepersCompound.Lightmapper/LightMapper.cs index cf7ce06..bc7d2fb 100644 --- a/KeepersCompound.Lightmapper/LightMapper.cs +++ b/KeepersCompound.Lightmapper/LightMapper.cs @@ -876,7 +876,8 @@ public class LightMapper origin = hitResult.Position += direction * MathUtils.Epsilon; } - return Math.Abs(hitDistanceFromTarget) < MathUtils.Epsilon; + // A large epsilon is used here to fix shadow acne on sloped surfaces :) + return Math.Abs(hitDistanceFromTarget) < 10 * MathUtils.Epsilon; } // TODO: Can this be merged with the above?