From 736d7810a0ba6dc4fa1439b8c45d4b6782a9aa31 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 1 Feb 2013 18:54:24 +0000 Subject: [PATCH] Fix an issue with the new cycles lamp MIS option not working correct with multiple lamps. --- intern/cycles/kernel/kernel_light.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index 8b32b7bd2e8..10a32226f17 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -312,6 +312,9 @@ __device bool lamp_light_eval(KernelGlobals *kg, int lamp, float3 P, float3 D, f ls->prim = ~0; ls->lamp = lamp; + if(!(ls->shader & SHADER_USE_MIS)) + return false; + if(type == LIGHT_DISTANT) { /* distant light */ float radius = data1.y;