Fix #108342: Regression: Cycles: Light group does not work
A couple of mistakes since the light linking commit: - The +1 got missed in some of the refactors in the branch - The order of arguments to the shadow path split was wrong Pull Request: https://projects.blender.org/blender/blender/pulls/108420
This commit is contained in:
parent
c5eaaa69bb
commit
db98d9816c
|
@ -218,7 +218,7 @@ ccl_device void shadow_linking_shade(KernelGlobals kg,
|
|||
|
||||
/* Branch off shadow kernel. */
|
||||
IntegratorShadowState shadow_state = integrate_direct_light_shadow_init_common(
|
||||
kg, state, &ray, bsdf_spectrum, 0, light_group);
|
||||
kg, state, &ray, bsdf_spectrum, light_group, 0);
|
||||
|
||||
/* The light is accumulated from the shade_surface kernel, which will make the clamping decision
|
||||
* based on the actual value of the bounce. For the dedicated shadow ray we want to follow the
|
||||
|
|
|
@ -222,7 +222,7 @@ integrate_direct_light_shadow_init_common(KernelGlobals kg,
|
|||
}
|
||||
|
||||
/* Write Light-group, +1 as light-group is int but we need to encode into a uint8_t. */
|
||||
INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, lightgroup) = light_group;
|
||||
INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, lightgroup) = light_group + 1;
|
||||
|
||||
#ifdef __PATH_GUIDING__
|
||||
INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, unlit_throughput) = unlit_throughput;
|
||||
|
@ -351,7 +351,7 @@ ccl_device_forceinline void integrate_surface_direct_light(KernelGlobals kg,
|
|||
const int light_group = ls.type != LIGHT_BACKGROUND ? ls.group :
|
||||
kernel_data.background.lightgroup;
|
||||
IntegratorShadowState shadow_state = integrate_direct_light_shadow_init_common(
|
||||
kg, state, &ray, bsdf_eval_sum(&bsdf_eval), mnee_vertex_count, light_group);
|
||||
kg, state, &ray, bsdf_eval_sum(&bsdf_eval), light_group, mnee_vertex_count);
|
||||
|
||||
if (is_transmission) {
|
||||
#ifdef __VOLUME__
|
||||
|
|
Loading…
Reference in New Issue