Cycles Light Tree: Add case for when an emitter is not selected #111292
|
@ -596,7 +596,7 @@ ccl_device int light_tree_cluster_select_emitter(KernelGlobals kg,
|
|||
has_importance |= ((importance[0] > 0) << i);
|
||||
}
|
||||
|
||||
if (total_importance[0] == 0.0f) {
|
||||
if (total_importance[0] == 0.0f || selected_index == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue