Fix translation hit record

master
max.nuding 2022-07-11 08:10:47 +02:00
parent c90b185b8d
commit 560b921b3a
Failed to extract signature
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ impl<H: Hittable> Hittable for Translate<H> {
match &self.hittable.hit(&moved_ray, t_min, t_max) {
Some(hit_record) => {
let mut hr = HitRecord {
point: hit_record.point,
point: hit_record.point + self.offset,
material: hit_record.material,
front_face: hit_record.front_face, // Maybe need to calc normal and front_face again?
normal: hit_record.normal,