Fix an issue with the new cycles lamp MIS option not working correct with
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 1 Feb 2013 18:54:24 +0000 (18:54 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 1 Feb 2013 18:54:24 +0000 (18:54 +0000)
multiple lamps.

intern/cycles/kernel/kernel_light.h

index 8b32b7b..10a3222 100644 (file)
@@ -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;