Fix T51589: Principled Subsurface Scattering, wrong shadow color

Apply mix of subsurface and base color (wrt subsurface) for rays that
have transmitted the surface.
This commit is contained in:
Pascal Schoen 2017-05-24 07:34:11 +02:00
parent 7b25ffb618
commit e20a33b89d
Notes: blender-bot 2023-02-14 06:56:54 +01:00
Referenced by issue #51589, Principled Subsurface Scattering, wrong shadow color
1 changed files with 5 additions and 0 deletions

View File

@ -150,6 +150,11 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
* getting lower and lower */
if(path_flag & PATH_RAY_DIFFUSE_ANCESTOR) {
subsurface = 0.0f;
/* need to set the base color in this case such that the
* rays get the correctly mixed color after transmitting
* the object */
base_color = albedo;
}
/* diffuse */