Fix #108315: Illegal CUDA address with shadow-linked mesh emitters
A mistake in the intersection picking logic: if a mesh was hit at least one intersection is to be recorded. Pull Request: https://projects.blender.org/blender/blender/pulls/108320
This commit is contained in:
committed by
Sergey Sharybin
parent
074abff87e
commit
cc25a37bee
@@ -61,7 +61,7 @@ ccl_device int shadow_linking_pick_mesh_intersection(KernelGlobals kg,
|
||||
if (set_membership != LIGHT_LINK_MASK_ALL) {
|
||||
++num_hits;
|
||||
|
||||
if ((linked_isect->prim == PRIM_NONE) && (lcg_step_float(lcg_state) < 1.0f / num_hits)) {
|
||||
if ((linked_isect->prim == PRIM_NONE) || (lcg_step_float(lcg_state) < 1.0f / num_hits)) {
|
||||
*linked_isect = current_isect;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user