diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/svm/svm_closure.h | 5 | ||||
-rw-r--r-- | intern/cycles/render/nodes.cpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index c495ebb35bd..2120c892490 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -411,7 +411,10 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * sc->data1 = param2; sc->data2 = -stack_load_float(stack, data_node.z); - if(!(ccl_fetch(sd, type) & PRIMITIVE_ALL_CURVE)) { + if(stack_valid(data_node.y)) { + sc->T = normalize(stack_load_float3(stack, data_node.y)); + } + else if(!(ccl_fetch(sd, type) & PRIMITIVE_ALL_CURVE)) { sc->T = normalize(ccl_fetch(sd, dPdv)); sc->data2 = 0.0f; } diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index bb76383c5cf..7ac872b8416 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -2358,6 +2358,7 @@ HairBsdfNode::HairBsdfNode() add_input("Offset", SHADER_SOCKET_FLOAT); add_input("RoughnessU", SHADER_SOCKET_FLOAT); add_input("RoughnessV", SHADER_SOCKET_FLOAT); + add_input("Tangent", SHADER_SOCKET_VECTOR); } void HairBsdfNode::compile(SVMCompiler& compiler) |