From 33e747fa1c0957546c10e4d7b490ac7fbb0fd2d2 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 7 Feb 2021 14:25:06 +0100 Subject: Abstracted lambertian into material --- src/trace/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/trace/mod.rs') diff --git a/src/trace/mod.rs b/src/trace/mod.rs index 7f02f6f..cf06246 100644 --- a/src/trace/mod.rs +++ b/src/trace/mod.rs @@ -28,9 +28,9 @@ impl NormTracer<'_> { } impl Tracer for NormTracer<'_> { - fn trace(&self, sampler: &mut dyn Sampler, ray: &Ray) -> Spectrum { - // Trace ray - if let Some(i) = self.scn.intersect(ray) { + fn trace(&self, _: &mut dyn Sampler, ray: &Ray) -> Spectrum { + // Trace ray, we dont care about material + if let Some((_, i)) = self.scn.intersect(ray) { let norm = i.n * 0.5 + Vector3f::new(0.5); return Spectrum::new_rgb(norm.x, norm.y, norm.z); -- cgit v1.2.3