Fix T43458: Crashes with hair transmission BSDF

Hair BSDF did not have proper behavior because of non-normalized
tangent direction (which it expected to be normalized).This lead
to wrong labels being returned by the hair BSDF samplers.
This commit is contained in:
Sergey Sharybin 2015-01-30 13:03:01 +05:00
parent 6b81ee6bea
commit bd10b72ad3
Notes: blender-bot 2023-02-14 09:33:14 +01:00
Referenced by issue #43458, Freezing and Crashing Wings
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
sc->data2 = 0.0f;
}
else
sc->T = sd->dPdu;
sc->T = normalize(sd->dPdu);
if(type == CLOSURE_BSDF_HAIR_REFLECTION_ID) {
sd->flag |= bsdf_hair_reflection_setup(sc);