ft: normal mapping

This commit is contained in:
2026-05-02 13:58:46 +02:00
parent ae73e626b9
commit bf980a28ec
6 changed files with 14 additions and 12 deletions

View File

@@ -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();
}