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:
@@ -267,6 +267,7 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag,
|
||||
if(fabsf(weight.x) > 0.0f) {
|
||||
sc.weight = make_float3(weight.x, 0.0f, 0.0f);
|
||||
sc.data0 = bssrdf->radius.x;
|
||||
sc.data1 = 0.0f;
|
||||
sd->flag |= bssrdf_setup(&sc, sc.type);
|
||||
sd->closure[sd->num_closure++] = sc;
|
||||
}
|
||||
@@ -274,6 +275,7 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag,
|
||||
if(fabsf(weight.y) > 0.0f) {
|
||||
sc.weight = make_float3(0.0f, weight.y, 0.0f);
|
||||
sc.data0 = bssrdf->radius.y;
|
||||
sc.data1 = 0.0f;
|
||||
sd->flag |= bssrdf_setup(&sc, sc.type);
|
||||
sd->closure[sd->num_closure++] = sc;
|
||||
}
|
||||
@@ -281,6 +283,7 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag,
|
||||
if(fabsf(weight.z) > 0.0f) {
|
||||
sc.weight = make_float3(0.0f, 0.0f, weight.z);
|
||||
sc.data0 = bssrdf->radius.z;
|
||||
sc.data1 = 0.0f;
|
||||
sd->flag |= bssrdf_setup(&sc, sc.type);
|
||||
sd->closure[sd->num_closure++] = sc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user