diff options
Diffstat (limited to 'intern/cycles/kernel/integrator/shade_volume.h')
-rw-r--r-- | intern/cycles/kernel/integrator/shade_volume.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/kernel/integrator/shade_volume.h b/intern/cycles/kernel/integrator/shade_volume.h index acda4b8e9d1..4a5015946aa 100644 --- a/intern/cycles/kernel/integrator/shade_volume.h +++ b/intern/cycles/kernel/integrator/shade_volume.h @@ -653,7 +653,8 @@ ccl_device_forceinline void volume_integrate_heterogeneous( /* Write accumulated emission. */ if (!is_zero(accum_emission)) { - kernel_accum_emission(kg, state, accum_emission, render_buffer); + kernel_accum_emission( + kg, state, accum_emission, render_buffer, object_lightgroup(kg, sd->object)); } # ifdef __DENOISING_FEATURES__ @@ -833,6 +834,12 @@ ccl_device_forceinline void integrate_volume_direct_light( INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, unshadowed_throughput) = throughput; } + /* Write Lightgroup, +1 as lightgroup is int but we need to encode into a uint8_t. */ + INTEGRATOR_STATE_WRITE( + shadow_state, shadow_path, lightgroup) = (ls->type != LIGHT_BACKGROUND) ? + ls->group + 1 : + kernel_data.background.lightgroup + 1; + integrator_state_copy_volume_stack_to_shadow(kg, shadow_state, state); } # endif |