[Bf-blender-cvs] [e20a33b89d7] master: Fix T51589: Principled Subsurface Scattering, wrong shadow color

Pascal Schoen noreply at git.blender.org
Wed May 24 07:47:10 CEST 2017


Commit: e20a33b89d75897dd7aa5e296abd756ec4b25db3
Author: Pascal Schoen
Date:   Wed May 24 07:34:11 2017 +0200
Branches: master
https://developer.blender.org/rBe20a33b89d75897dd7aa5e296abd756ec4b25db3

Fix T51589: Principled Subsurface Scattering, wrong shadow color

Apply mix of subsurface and base color (wrt subsurface) for rays that
have transmitted the surface.

===================================================================

M	intern/cycles/kernel/svm/svm_closure.h

===================================================================

diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h
index 0e1aedf2918..4a0bbb25c1d 100644
--- a/intern/cycles/kernel/svm/svm_closure.h
+++ b/intern/cycles/kernel/svm/svm_closure.h
@@ -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 */




More information about the Bf-blender-cvs mailing list