Fix T103507: Distant lights partially contribute to wrong lightgroup

The the BSDF-sampling half of MIS next-event estimation for distant lights was
using the background lightgroup instead of the lamp's lightgroup.
This commit is contained in:
Lukas Stockner 2023-01-06 01:08:17 +01:00
parent d290b8b2b9
commit faca2c614b
Notes: blender-bot 2023-05-22 12:40:41 +02:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #103507, Light Groups World Environment anomaly
1 changed files with 1 additions and 2 deletions

View File

@ -185,8 +185,7 @@ ccl_device_inline void integrate_distant_lights(KernelGlobals kg,
/* Write to render buffer. */
const float3 throughput = INTEGRATOR_STATE(state, path, throughput);
kernel_accum_emission(
kg, state, throughput * light_eval, render_buffer, kernel_data.background.lightgroup);
kernel_accum_emission(kg, state, throughput * light_eval, render_buffer, ls.group);
}
}
}