From 9569f772f09f8de3eb879315920a0bd493171f6c Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Wed, 3 Aug 2022 00:07:03 -0700 Subject: [PATCH] Fix incorrect background color handling in glossy reflections. Bug introduced in the previous refector removing the LightPath struct. --- src/renderer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer.rs b/src/renderer.rs index c4dcf2b..26c3889 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -500,7 +500,8 @@ fn trace_camera_light_path( .background_color .to_spectral_sample(ray.wavelength) .e - * mis_pdf; + * attenuation + / mis_pdf; break; }