Revert "Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader"

This reverts commit 81b129d3b8.

This is not the correct fix yet. More details in T40322
This commit is contained in:
Dalai Felinto
2014-05-24 14:21:18 -03:00
parent c75261c8cb
commit b3f9117523

View File

@@ -58,7 +58,9 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
#ifdef __SUBSURFACE__
/* sample subsurface scattering */
if((is_combined || is_sss) && (sd->flag & SD_BSSRDF)) {
kernel_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, &ray, &throughput);
/* when mixing BSSRDF and BSDF closures we should skip BSDF lighting if scattering was successful */
if (kernel_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, &ray, &throughput))
is_sss = true;
}
#endif
@@ -95,6 +97,7 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
#ifdef __SUBSURFACE__
/* sample subsurface scattering */
if((is_combined || is_sss) && (sd->flag & SD_BSSRDF)) {
/* when mixing BSSRDF and BSDF closures we should skip BSDF lighting if scattering was successful */
kernel_branched_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, throughput);
}
#endif