diff --git a/src/BVH/BVH_BinaryTree.lxx b/src/BVH/BVH_BinaryTree.lxx index 343288ebc7..54a036da80 100644 --- a/src/BVH/BVH_BinaryTree.lxx +++ b/src/BVH/BVH_BinaryTree.lxx @@ -293,7 +293,7 @@ BVH_Tree* BVH_Tree::CollapseToQuadTree aNodeInfo = BVH_Vec4i (0 /* inner flag */, aNbNodes, aGrandChildNodes.Size() - 1, std::get<1> (aNode) /* level */); - aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode)); + aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode) + 1); aNbNodes += aGrandChildNodes.Size(); }