latest
This commit is contained in:
@@ -30,8 +30,10 @@ fn ray_color(r: &Ray, world: &mut dyn Hittable, depth: i32) -> Color {
|
||||
}
|
||||
|
||||
if world.hit(r, 0.001, INFINITY, &mut rec) {
|
||||
let target = rec.p + random_in_hemisphere(&rec.normal);
|
||||
return 0.5 * ray_color(&Ray::new(rec.p, target - rec.p), world, depth - 1)
|
||||
let mut scattered = Ray::new_empty();
|
||||
let mut attenuation = Color::new_empty();
|
||||
|
||||
if rec.mat_ptr
|
||||
}
|
||||
|
||||
let unit_direction: Vec3 = r.direction().unit_vector();
|
||||
|
||||
Reference in New Issue
Block a user