Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-10-08 16:48:55 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-08 17:11:02 +0300
commit736be7cf5899047167e6b377414f35b2043191e9 (patch)
treed6cfaa78ec53ee682c72894504240793ccbbedc2 /intern
parent4d71138738ca8ba7e4908328d81d1f6c95fc84cd (diff)
Fix T91997: Cycles glass + SSS not rendering correctly
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/integrator/integrator_subsurface.h5
1 files changed, 4 insertions, 1 deletions
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]);