diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-05-24 21:21:18 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-05-24 21:22:55 +0400 |
commit | b3f9117523d33568c6a8df1a34bbb695d3d53e1e (patch) | |
tree | df102999d77c882b5e26a84a7b133a8278f277e4 /intern | |
parent | c75261c8cba75ac3f4313834e9aae91378cbfc33 (diff) |
Revert "Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader"
This reverts commit 81b129d3b837e31c0d6d2a9d2a6e39d39e47c1ec.
This is not the correct fix yet. More details in T40322
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_bake.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h index 5d7f930a922..b64c5cecbff 100644 --- a/intern/cycles/kernel/kernel_bake.h +++ b/intern/cycles/kernel/kernel_bake.h @@ -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 |