From 4ac69c26db4c246dfb597411884af2a7ecc7ee66 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 8 Sep 2022 15:11:27 +0200 Subject: Fix Cycles wrong MIS logic in shade_light kernel after recent changes Though end result was still correct. Thanks to Alaska for spotting this. --- intern/cycles/kernel/integrator/shade_light.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'intern') diff --git a/intern/cycles/kernel/integrator/shade_light.h b/intern/cycles/kernel/integrator/shade_light.h index a4246f99bbf..f2d65eddfbb 100644 --- a/intern/cycles/kernel/integrator/shade_light.h +++ b/intern/cycles/kernel/integrator/shade_light.h @@ -62,8 +62,7 @@ ccl_device_inline void integrate_light(KernelGlobals kg, /* multiple importance sampling, get regular light pdf, * and compute weight with respect to BSDF pdf */ const float mis_ray_pdf = INTEGRATOR_STATE(state, path, mis_ray_pdf); - const float mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf); - light_eval *= mis_weight; + mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf); } /* Write to render buffer. */ -- cgit v1.2.3