fix huge bvh node at end

This commit is contained in:
2026-03-17 09:35:32 -07:00
parent 4593514954
commit f91fcf6b6f

View File

@@ -35,7 +35,7 @@ impl Bvh{
let mut push_slices=|index:usize|{
let len=index-last_index;
let count=len.div_ceil(MAX_SLICE_LEN);
let slice_len=len/count;
let slice_len=MAX_SLICE_LEN;
bvh_nodes.reserve(count);
// 0123456789
// split into groups of MAX_SLICE_LEN=4