From dda8d0920a4136f116dbdbe83dd8f1dec95212f8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 9 Jan 2024 16:50:21 +0100 Subject: [PATCH] Fix #116211: Cycles light linking incorrect with transparent objects --- intern/cycles/kernel/integrator/shade_surface.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h index 6ed26dc1eb2..2072ef96330 100644 --- a/intern/cycles/kernel/integrator/shade_surface.h +++ b/intern/cycles/kernel/integrator/shade_surface.h @@ -495,12 +495,13 @@ ccl_device_forceinline int integrate_surface_bsdf_bssrdf_bounce( INTEGRATOR_STATE_WRITE(state, path, mis_origin_n) = sc->N; INTEGRATOR_STATE_WRITE(state, path, min_ray_pdf) = fminf( unguided_bsdf_pdf, INTEGRATOR_STATE(state, path, min_ray_pdf)); - } + #ifdef __LIGHT_LINKING__ - if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_LINKING) { - INTEGRATOR_STATE_WRITE(state, path, mis_ray_object) = sd->object; - } + if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_LINKING) { + INTEGRATOR_STATE_WRITE(state, path, mis_ray_object) = sd->object; + } #endif + } path_state_next(kg, state, label, sd->flag);