Fix T91997: Cycles glass + SSS not rendering correctly

This commit is contained in:
Brecht Van Lommel 2021-10-08 15:48:55 +02:00
parent 4d71138738
commit 736be7cf58
Notes: blender-bot 2023-10-13 01:54:23 +02:00
Referenced by issue #91997, Glass + SSS Irregularity in Cycles X
1 changed files with 4 additions and 1 deletions

View File

@ -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]);