diff options
Diffstat (limited to 'src/trace/mod.rs')
-rw-r--r-- | src/trace/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/trace/mod.rs b/src/trace/mod.rs index 90f12da..9c8b0b8 100644 --- a/src/trace/mod.rs +++ b/src/trace/mod.rs @@ -19,8 +19,7 @@ impl NormTracer { pub fn trace(&self, scn: &Scene, ray: &Ray) -> Spectrum { // Trace ray if let Some(i) = scn.intersect(ray) { - let p = ray.at(i.t); - let norm = i.shp.norm_at(&p) * 0.5 + Vector3f::new(0.5); + let norm = i.n * 0.5 + Vector3f::new(0.5); return Spectrum::new_rgb(norm.x, norm.y, norm.z); } |