[Bf-blender-cvs] [206b098fab5] soc-2022-many-lights-sampling: Fix improper variable setting in PDF function while splitting
Brecht Van Lommel
noreply at git.blender.org
Tue Sep 13 17:53:59 CEST 2022
Commit: 206b098fab5e9fedd44aa8f1c493c7dd9b87369b
Author: Brecht Van Lommel
Date: Tue Sep 13 17:47:36 2022 +0200
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB206b098fab5e9fedd44aa8f1c493c7dd9b87369b
Fix improper variable setting in PDF function while splitting
This fixes an issue where a variable in the light_tree_pdf function
(selected_light) would not be set properly.
This fixes some issues that can be observed when splitting is in use.
Contributed by Alaska.
Differential Revision: https://developer.blender.org/D15955
===================================================================
M intern/cycles/kernel/light/light_tree.h
===================================================================
diff --git a/intern/cycles/kernel/light/light_tree.h b/intern/cycles/kernel/light/light_tree.h
index 54a4c88ea25..32da3f5bf29 100644
--- a/intern/cycles/kernel/light/light_tree.h
+++ b/intern/cycles/kernel/light/light_tree.h
@@ -572,7 +572,7 @@ ccl_device float light_tree_pdf(
}
else {
float light_probability = 1.0f;
- const int selected_light = light_tree_cluster_select_emitter(
+ selected_light = light_tree_cluster_select_emitter(
kg, &randu, P, N, knode, &light_probability);
light_weight = light_tree_emitter_reservoir_weight(kg, P, N, selected_light);
}
More information about the Bf-blender-cvs
mailing list