Fix more Cycles incorrect principled BSDF mixing due to missing initialization.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 3 Feb 2018 12:29:44 +0000 (13:29 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 3 Feb 2018 12:43:44 +0000 (13:43 +0100)
Spotted by Ha Hyung-jin, thanks!

intern/cycles/kernel/svm/svm_closure.h

index 7fc96f7e47f1b3a87b72035d7be396561396d75c..578434792e4af77b06efe0c609f1b29aac24d9d8 100644 (file)
@@ -333,6 +333,8 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
                                                        }
 
                                                        bsdf->N = N;
+                                                       bsdf->T = make_float3(0.0f, 0.0f, 0.0f);
+                                                       bsdf->extra = NULL;
 
                                                        if(distribution == CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID)
                                                                transmission_roughness = 1.0f - (1.0f - refl_roughness) * (1.0f - transmission_roughness);