Commit: 673984b222dbb33239ae89fd32f0d2a1de586b71
Author: Brecht Van Lommel
Date:   Thu Oct 28 21:33:02 2021 +0200
Branches: blender-v3.0-release
https://developer.blender.org/rB673984b222dbb33239ae89fd32f0d2a1de586b71

Fix T92158: Cycles crash with Fast GI and area light MIS

===================================================================

M       intern/cycles/kernel/integrator/intersect_closest.h

===================================================================

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

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to