Fix #29278: cycles crash with displacement method both.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 15 Nov 2011 22:09:30 +0000 (22:09 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 15 Nov 2011 22:09:30 +0000 (22:09 +0000)
intern/cycles/kernel/kernel_shader.h

index ac0df71c38f552fdfa4dc462dca17758c785874e..1647504207a5ff48a5c5202dc24415ea9bc7dd40 100644 (file)
@@ -226,8 +226,7 @@ __device void shader_setup_from_displace(KernelGlobals *kg, ShaderData *sd,
        Ng = triangle_normal_MT(kg, prim, &shader);
 
        /* force smooth shading for displacement */
-       if(shader >= 0)
-               shader = -shader;
+       sd->shader |= SHADER_SMOOTH_NORMAL;
 
        /* watch out: no instance transform currently */