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

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);
}
}
}