Use larger epsilon for ray traces

This commit is contained in:
Jarrod Doyle 2025-01-14 20:22:47 +00:00
parent 74b175648b
commit d7f6bfa0c3
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 1 deletions

View File

@ -876,7 +876,8 @@ public class LightMapper
origin = hitResult.Position += direction * MathUtils.Epsilon; 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? // TODO: Can this be merged with the above?