Light Linking: Select one of dedicated lights #107739

Merged
Sergey Sharybin merged 3 commits from Sergey/blender:cycles-light-linking-multiple-light into cycles-light-linking 2023-05-16 16:24:34 +02:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 7233cf42ac - Show all commits

View File

@ -297,7 +297,7 @@ ccl_device_forceinline int lights_intersect_impl(KernelGlobals kg,
* For the shadow path used for the dedicated light shading ignore all non-shadow-linked
* lights. */
if (kernel_data.kernel_features & KERNEL_FEATURE_SHADOW_LINKING) {
if constexpr (is_main_path) {
if (is_main_path) {
if (is_indirect_ray && kernel_data_fetch(lights, lamp).shadow_set_membership) {
continue;
}
@ -345,7 +345,7 @@ ccl_device_forceinline int lights_intersect_impl(KernelGlobals kg,
++num_hits;
#ifdef __SHADOW_LINKING__
if constexpr (!is_main_path) {
if (!is_main_path) {

CUDA 10 does not support C++17, so can't use if constexpr.

Leaving it out should give the same result I think.

CUDA 10 does not support C++17, so can't use `if constexpr`. Leaving it out should give the same result I think.
/* The non-main rays are only raced by the dedicated light kernel, after the shadow linking
* feature check. */
kernel_assert(kernel_data.kernel_features & KERNEL_FEATURE_SHADOW_LINKING);