Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2014-05-23 02:46:18 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-05-23 02:46:22 +0400
commit81b129d3b837e31c0d6d2a9d2a6e39d39e47c1ec (patch)
tree95d6f62b2ceaa67a62973a09c84a11b8e269ede1 /intern
parentd7e4a793880796e7236f73df3f35abb045941aad (diff)
Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader
If we are using a mix node we still need to evaluate the BSDF lighting even if scattering is successful. Note: this was working for branched path (probably an oversight when branched path support was introduced for baking, a good oversight though ;)
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_bake.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index b64c5cecbff..5d7f930a922 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -58,9 +58,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 */
- if (kernel_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, &ray, &throughput))
- is_sss = true;
+ kernel_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, &ray, &throughput);
}
#endif
@@ -97,7 +95,6 @@ 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