diff --git a/src/main/java/eu/jonahbauer/raytracing/render/Camera.java b/src/main/java/eu/jonahbauer/raytracing/render/Camera.java index 71070f7..f8a997d 100644 --- a/src/main/java/eu/jonahbauer/raytracing/render/Camera.java +++ b/src/main/java/eu/jonahbauer/raytracing/render/Camera.java @@ -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();