Fix T40032: hair BSDF not working correct after primitive type code refactoring.

This commit is contained in:
Brecht Van Lommel
2014-05-05 17:14:46 +02:00
parent 7a2ece3c19
commit 8641e30787

View File

@@ -357,12 +357,14 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
sc->data0 = param1; sc->data0 = param1;
sc->data1 = param2; sc->data1 = param2;
sc->offset = -stack_load_float(stack, data_node.z); sc->offset = -stack_load_float(stack, data_node.z);
if(sd->type & PRIMITIVE_ALL_CURVE) {
if(!(sd->type & PRIMITIVE_ALL_CURVE)) {
sc->T = normalize(sd->dPdv); sc->T = normalize(sd->dPdv);
sc->offset = 0.0f; sc->offset = 0.0f;
} }
else else
sc->T = sd->dPdu; sc->T = sd->dPdu;
if(type == CLOSURE_BSDF_HAIR_REFLECTION_ID) { if(type == CLOSURE_BSDF_HAIR_REFLECTION_ID) {
sd->flag |= bsdf_hair_reflection_setup(sc); sd->flag |= bsdf_hair_reflection_setup(sc);
} }