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

This commit is contained in:
Brecht Van Lommel 2021-10-28 21:33:02 +02:00
parent eda8065afc
commit 673984b222
Notes: blender-bot 2023-02-14 07:25:46 +01:00
Referenced by issue #92158, Crashing on CyclesX Tile Rendering with AS
1 changed files with 5 additions and 3 deletions

View File

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