Skip to content

Commit

Permalink
fix Weird lines in rendering (after diffuse ) #1 (shadow acne)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy5909 committed Apr 28, 2024
1 parent 123ed7d commit ee55b22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Camera {
return Color::new();
}
let mut rec = HitRecord::new();
if world.hit(r, Interval::from(0.0, INFINITY), &mut rec) {
if world.hit(r, Interval::from(0.001, INFINITY), &mut rec) {
return 0.5 * Self::ray_color(&Ray::new(rec.p, random_on_hemisphere(rec.normal)), depth-1, world);
}
let unit_direction = unit_vector(r.dir());
Expand Down

0 comments on commit ee55b22

Please sign in to comment.