diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-10-28 22:33:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-28 22:33:52 +0300 |
commit | 673984b222dbb33239ae89fd32f0d2a1de586b71 (patch) | |
tree | 7d84babf575dd2d65a312eb387597e37e47d8427 /intern | |
parent | eda8065afcf27a8dc4df9b273815a39eea347415 (diff) |
Fix T92158: Cycles crash with Fast GI and area light MIS
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/integrator/intersect_closest.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/kernel/integrator/intersect_closest.h b/intern/cycles/kernel/integrator/intersect_closest.h index d5a9df9669b..7fb88fc2804 100644 --- a/intern/cycles/kernel/integrator/intersect_closest.h +++ b/intern/cycles/kernel/integrator/intersect_closest.h @@ -159,9 +159,11 @@ ccl_device void integrator_intersect_closest(KernelGlobals kg, IntegratorState s if (path_state_ao_bounce(kg, state)) { ray.t = kernel_data.integrator.ao_bounces_distance; - const float object_ao_distance = kernel_tex_fetch(__objects, last_isect_object).ao_distance; - if (object_ao_distance != 0.0f) { - ray.t = object_ao_distance; + if (last_isect_object != OBJECT_NONE) { + const float object_ao_distance = kernel_tex_fetch(__objects, last_isect_object).ao_distance; + if (object_ao_distance != 0.0f) { + ray.t = object_ao_distance; + } } } |