|
|
@ -130,7 +130,7 @@ public final class Camera {
|
|
|
|
private @NotNull Color getColor(@NotNull Scene scene, @NotNull Ray ray, int depth) {
|
|
|
|
private @NotNull Color getColor(@NotNull Scene scene, @NotNull Ray ray, int depth) {
|
|
|
|
if (depth <= 0) return Color.BLACK;
|
|
|
|
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()) {
|
|
|
|
if (optional.isPresent()) {
|
|
|
|
var result = optional.get();
|
|
|
|
var result = optional.get();
|
|
|
|
|
|
|
|
|
|
|
|