[Bf-blender-cvs] [736be7cf589] master: Fix T91997: Cycles glass + SSS not rendering correctly

Brecht Van Lommel noreply at git.blender.org
Fri Oct 8 16:11:11 CEST 2021


Commit: 736be7cf5899047167e6b377414f35b2043191e9
Author: Brecht Van Lommel
Date:   Fri Oct 8 15:48:55 2021 +0200
Branches: master
https://developer.blender.org/rB736be7cf5899047167e6b377414f35b2043191e9

Fix T91997: Cycles glass + SSS not rendering correctly

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

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 c309d20a046..9026de1c064 100644
--- a/intern/cycles/kernel/integrator/integrator_subsurface.h
+++ b/intern/cycles/kernel/integrator/integrator_subsurface.h
@@ -59,6 +59,9 @@ ccl_device int subsurface_bounce(INTEGRATOR_STATE_ARGS, ShaderData *sd, const Sh
   INTEGRATOR_STATE_WRITE(path, flag) = (path_flag & ~PATH_RAY_CAMERA) | PATH_RAY_SUBSURFACE;
   INTEGRATOR_STATE_WRITE(path, throughput) *= shader_bssrdf_sample_weight(sd, sc);
 
+  /* Advance random number offset for bounce. */
+  INTEGRATOR_STATE_WRITE(path, rng_offset) += PRNG_BOUNCE_NUM;
+
   if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) {
     if (INTEGRATOR_STATE(path, bounce) == 0) {
       INTEGRATOR_STATE_WRITE(path, diffuse_glossy_ratio) = one_float3();
@@ -599,7 +602,7 @@ ccl_device_inline bool subsurface_scatter(INTEGRATOR_STATE_ARGS)
   integrator_state_write_isect(INTEGRATOR_STATE_PASS, &ss_isect.hits[0]);
   integrator_state_write_ray(INTEGRATOR_STATE_PASS, &ray);
 
-  /* Advanced random number offset for bounce. */
+  /* Advance random number offset for bounce. */
   INTEGRATOR_STATE_WRITE(path, rng_offset) += PRNG_BOUNCE_NUM;
 
   const int shader = intersection_get_shader(kg, &ss_isect.hits[0]);



More information about the Bf-blender-cvs mailing list