Fix more Cycles incorrect principled BSDF mixing due to missing initialization.

Spotted by Ha Hyung-jin, thanks!
This commit is contained in:
Brecht Van Lommel 2018-02-03 13:29:44 +01:00
parent 7ea7ce970c
commit db989e1f11
1 changed files with 2 additions and 0 deletions

View 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);