[Bf-blender-cvs] [7de3f44f79d] soc-2022-many-lights-sampling: Fix: light tree node partitioning
Jeffrey Liu
noreply at git.blender.org
Sun Jul 17 19:20:15 CEST 2022
Commit: 7de3f44f79dc93b5b8e53cb43365bc4494256901
Author: Jeffrey Liu
Date: Sat Jul 16 13:06:45 2022 -0400
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB7de3f44f79dc93b5b8e53cb43365bc4494256901
Fix: light tree node partitioning
This fixes the partitioning of the light tree primitives. Previously,
the construction was not calculating the splitting dimension properly.
===================================================================
M intern/cycles/scene/light_tree.cpp
===================================================================
diff --git a/intern/cycles/scene/light_tree.cpp b/intern/cycles/scene/light_tree.cpp
index c0676f508e3..2c3c8cb880f 100644
--- a/intern/cycles/scene/light_tree.cpp
+++ b/intern/cycles/scene/light_tree.cpp
@@ -357,7 +357,7 @@ LightTreeBuildNode *LightTree::recursive_build(vector<LightTreePrimitiveInfo> &p
* This is an O(n) algorithm where we iterate from the left and right side,
* and swaps the appropriate left and right elements until complete. */
int left = start, right = end - 1;
- float bounding_dimension = min_bucket * (centroid_bounds.size()[min_dim] /
+ float bounding_dimension = (min_bucket + 1) * (centroid_bounds.size()[min_dim] /
LightTreeBucketInfo::num_buckets) +
centroid_bounds.min[min_dim];
while (left < right) {
More information about the Bf-blender-cvs
mailing list