[Bf-blender-cvs] [541ff54793f] cycles-x: Fix T91279: incorrect mist and other passes with subsurface scattering

Brecht Van Lommel noreply at git.blender.org
Thu Sep 9 16:36:24 CEST 2021


Commit: 541ff54793f50474559ac7a33d2c6d91ef5cc6e7
Author: Brecht Van Lommel
Date:   Thu Sep 9 15:57:10 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB541ff54793f50474559ac7a33d2c6d91ef5cc6e7

Fix T91279: incorrect mist and other passes with subsurface scattering

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

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 a4f173e3009..73375c06089 100644
--- a/intern/cycles/kernel/integrator/integrator_subsurface.h
+++ b/intern/cycles/kernel/integrator/integrator_subsurface.h
@@ -55,7 +55,8 @@ ccl_device int subsurface_bounce(INTEGRATOR_STATE_ARGS, ShaderData *sd, const Sh
   INTEGRATOR_STATE_WRITE(isect, object) = sd->object;
 
   /* Pass BSSRDF parameters. */
-  INTEGRATOR_STATE_WRITE(path, flag) |= PATH_RAY_SUBSURFACE;
+  const uint32_t path_flag = INTEGRATOR_STATE_WRITE(path, flag);
+  INTEGRATOR_STATE_WRITE(path, flag) = (path_flag & ~PATH_RAY_CAMERA) | PATH_RAY_SUBSURFACE;
   INTEGRATOR_STATE_WRITE(path, throughput) *= shader_bssrdf_sample_weight(sd, sc);
 
   if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) {



More information about the Bf-blender-cvs mailing list