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 ;)
This commit is contained in:
parent
d7e4a79388
commit
81b129d3b8
Notes:
blender-bot
2023-02-14 10:36:33 +01:00
Referenced by commit b3f9117523
, Revert "Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader"
Referenced by issue #40322, Glitch in baking a mixed SSS shader
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue