Fix #144258: Cycles: Subsurface scattering doesn't work with shadow linking

When shadow linking is enabled, `intersect_dedicated_light` is scheduled even
if the `PATH_RAY_SUBSURFACE` flag is set. This checks the flag and schedules
`intersect_subsurface` instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/145621
This commit is contained in:
Amogh Shivaram
2025-09-05 15:31:50 +02:00
committed by Brecht Van Lommel
parent 84e2795ee2
commit 11d98c14b7
7 changed files with 20 additions and 2 deletions

View File

@@ -853,8 +853,8 @@ ccl_device_forceinline void integrator_shade_surface(KernelGlobals kg,
#ifdef __SHADOW_LINKING__
/* No need to cast shadow linking rays at a transparent bounce: the lights will be accumulated
* via the main path in this case. */
if ((continue_path_label & LABEL_TRANSPARENT) == 0) {
* via the main path in this case. BSSRDF bounces continue with intersect_subsurface. */
if ((continue_path_label & (LABEL_TRANSPARENT | LABEL_SUBSURFACE_SCATTER)) == 0) {
if (shadow_linking_schedule_intersection_kernel<current_kernel>(kg, state)) {
return;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.