fix "shadow acne"

This commit is contained in:
jbb01 2024-08-03 02:54:15 +02:00
parent d2ca6922ef
commit 8e77662b33

View File

@ -130,7 +130,7 @@ public final class Camera {
private @NotNull Color getColor(@NotNull Scene scene, @NotNull Ray ray, int depth) {
if (depth <= 0) return Color.BLACK;
var optional = scene.hit(ray, Range.NON_NEGATIVE);
var optional = scene.hit(ray, new Range(0.001, Double.POSITIVE_INFINITY));
if (optional.isPresent()) {
var result = optional.get();