diff options
author | Sebastian Herholz <sherholz> | 2021-11-24 16:04:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-01 22:20:12 +0300 |
commit | cb334428b012294a4503a34e1e2eca5c84d516bd (patch) | |
tree | cd056cf8ed110943dae4d6b4c5e74fe665761256 /intern/cycles/kernel/integrator | |
parent | 9afd6e7b70d5d236843480c9cad879740b2bfb0a (diff) |
Cycles: fix bugs in point and spot light multiple importance sampling
* Spot lights are now handled as disks aligned with the direction of the
spotlight instead of view aligned disks.
* Point light is now handled separately from the spot light, to fix a case
where multiple lights are intersected in a row. Before the origin of the
ray was the previously intersected light and not the origin of the initial
ray traced from the last surface/volume interaction.
This makes both strategies in multiple importance sampling converge to the same
result. It changes the render results in some scenes, for example the junkshop
scene where there are large point lights overlapping scene geometry and each
other.
Differential Revision: https://developer.blender.org/D13233
Diffstat (limited to 'intern/cycles/kernel/integrator')
-rw-r--r-- | intern/cycles/kernel/integrator/intersect_closest.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/kernel/integrator/intersect_closest.h b/intern/cycles/kernel/integrator/intersect_closest.h index 366bfba7aca..df710dc1d82 100644 --- a/intern/cycles/kernel/integrator/intersect_closest.h +++ b/intern/cycles/kernel/integrator/intersect_closest.h @@ -341,9 +341,8 @@ ccl_device void integrator_intersect_closest(KernelGlobals kg, * these in the path_state_init. */ const int last_type = INTEGRATOR_STATE(state, isect, type); const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag); - hit = lights_intersect( - kg, &ray, &isect, last_isect_prim, last_isect_object, last_type, path_flag) || + kg, state, &ray, &isect, last_isect_prim, last_isect_object, last_type, path_flag) || hit; } |