diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-30 11:03:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-30 11:03:01 +0300 |
commit | bd10b72ad38eea117ee440567c1e2edb04970f36 (patch) | |
tree | 5e2609b45f1ba5eac375e20201782a599dc46134 | |
parent | 6b81ee6beafba04f9dcf591e442612aef57228e8 (diff) |
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.
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index e4e3b683cd1..ed3f277e898 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -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); |