This commit is contained in:
2026-05-13 14:17:53 +02:00
parent b4b214ebf7
commit 71985a6c34
2 changed files with 18 additions and 14 deletions

View File

@@ -57,9 +57,10 @@ impl Debug for Quad {
}
}
// FIXME: texture mapping does not work properly for quads
impl Hittable for Quad {
fn hit(&self, r: &Ray) -> Option<Hit> {
Quad::hit(
let hit = Quad::hit(
self.p1,
self.p2,
self.p3,
@@ -67,7 +68,9 @@ impl Hittable for Quad {
self.material.clone(),
self.normal,
r,
)
);
return hit
}
fn to_uv(&self, point: &Vec3) -> Vec3 {