Fix T47727: Weird bake results with non integer color values
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 18 May 2016 13:08:48 +0000 (15:08 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 18 May 2016 13:11:05 +0000 (15:11 +0200)
intern/cycles/kernel/kernel_bake.h

index 60110fb980a051c04e4b21820fb0ced2cc073ca3..392cff9c2816c10d0b5ad87aa63b4cb2c4ad8760 100644 (file)
@@ -242,11 +242,11 @@ ccl_device float3 kernel_bake_evaluate_direct_indirect(KernelGlobals *kg,
        }
 
        if(is_direct) {
-               out += safe_divide_color(direct, color);
+               out += safe_divide_even_color(direct, color);
        }
 
        if(is_indirect) {
-               out += safe_divide_color(indirect, color);
+               out += safe_divide_even_color(indirect, color);
        }
 
        return out;