Commit: 403fd0734f5576999f81bb3522495688cb1b368d
Author: Brecht Van Lommel
Date:   Tue Jul 13 18:51:10 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB403fd0734f5576999f81bb3522495688cb1b368d

Fix incorrect diffuse/glossy/transmission with indirect SSS

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

M       intern/cycles/kernel/integrator/integrator_subsurface.h

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

diff --git a/intern/cycles/kernel/integrator/integrator_subsurface.h 
b/intern/cycles/kernel/integrator/integrator_subsurface.h
index a8ebbdd6a0c..a24b4bb4c03 100644
--- a/intern/cycles/kernel/integrator/integrator_subsurface.h
+++ b/intern/cycles/kernel/integrator/integrator_subsurface.h
@@ -114,7 +114,9 @@ ccl_device int subsurface_bounce(INTEGRATOR_STATE_ARGS, 
ShaderData *sd, const Sh
   /* Pass BSSRDF parameters. */
   INTEGRATOR_STATE_WRITE(path, flag) |= PATH_RAY_SUBSURFACE;
   INTEGRATOR_STATE_WRITE(path, throughput) *= shader_bssrdf_sample_weight(sd, 
sc);
-  INTEGRATOR_STATE_WRITE(path, diffuse_glossy_ratio) = one_float3();
+  if (INTEGRATOR_STATE(path, bounce) == 0) {
+    INTEGRATOR_STATE_WRITE(path, diffuse_glossy_ratio) = one_float3();
+  }
 
   const float roughness = (sc->type == CLOSURE_BSSRDF_PRINCIPLED_ID ||
                            sc->type == 
CLOSURE_BSSRDF_PRINCIPLED_RANDOM_WALK_ID) ?

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to