Fix T44123: Cycles SSS renders black in recent builds

Issue was introduced in 01ee21f where i didn't notice *_setup()
function only doing partial initialization, and some of parameters
are expected to be initialized by callee function.

This was hitting only some setups, so tests with benchmark scenes
didn't unleash issues. Now it should all be fine.

This is to go to the 2.74 branch and we actually might re-AHOY.
This commit is contained in:
Sergey Sharybin
2015-03-25 02:30:43 +05:00
parent 41ed59e0eb
commit 87cff57207
10 changed files with 12 additions and 14 deletions

View File

@@ -27,8 +27,11 @@ ccl_device void svm_node_glass_setup(ShaderData *sd, ShaderClosure *sc, int type
sc->data2 = 0.0f;
sd->flag |= bsdf_refraction_setup(sc);
}
else
else {
sc->data0 = 0.0f;
sc->data1 = 0.0f;
sd->flag |= bsdf_reflection_setup(sc);
}
}
else if(type == CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID) {
sc->data0 = roughness;
@@ -384,6 +387,8 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
* spawned by transmission from the front */
sc->weight = make_float3(1.0f, 1.0f, 1.0f);
sc->N = N;
sc->data0 = 0.0f;
sc->data1 = 0.0f;
sd->flag |= bsdf_transparent_setup(sc);
}
}
@@ -529,6 +534,7 @@ ccl_device void svm_node_closure_volume(KernelGlobals *kg, ShaderData *sd, float
if(sc) {
sc->data0 = param2; /* g */
sc->data1 = 0.0f;
sd->flag |= volume_henyey_greenstein_setup(sc);
}
break;