Fix T37790: OSL not rendering subsurface scattering color correct since upgrade to 1.4.

This commit is contained in:
Brecht Van Lommel 2013-12-18 12:29:11 +01:00
parent f92bb64505
commit 6ccf3402cb

@ -150,11 +150,11 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag,
if (prim) {
ShaderClosure sc;
#ifdef OSL_SUPPORTS_WEIGHTED_CLOSURE_COMPONENTS
sc.weight = weight*TO_FLOAT3(comp->w);
#else
sc.weight = weight;
weight = weight*TO_FLOAT3(comp->w);
#endif
sc.weight = weight;
prim->setup();
@ -391,11 +391,11 @@ static void flatten_volume_closure_tree(ShaderData *sd,
if (prim) {
ShaderClosure sc;
#ifdef OSL_SUPPORTS_WEIGHTED_CLOSURE_COMPONENTS
sc.weight = weight*TO_FLOAT3(comp->w);
#else
sc.weight = weight;
weight = weight*TO_FLOAT3(comp->w);
#endif
sc.weight = weight;
prim->setup();