ft: normal mapping
This commit is contained in:
@@ -235,7 +235,10 @@ impl Camera {
|
||||
let closest = Hit::hit_list(hittables, r);
|
||||
if let Some(hit) = closest {
|
||||
if let Some((scattered, att)) = hit.mat().scatter(&hit, r) {
|
||||
return att * self.ray_colour(hittables, &scattered, depth - 1);
|
||||
if let Some(ray) = scattered {
|
||||
return att * self.ray_colour(hittables, &ray, depth - 1);
|
||||
}
|
||||
return att;
|
||||
}
|
||||
return Colour::default();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user