fewer octr tree checks when growing a volume

This commit is contained in:
zomseffen 2025-01-24 09:59:15 +01:00
parent 886f92470c
commit 1d4b31c142
2 changed files with 115 additions and 15 deletions
src/scene

View file

@ -7,7 +7,7 @@ use crate::primitives::cube::Cube;
extern crate rand;
pub const CHUNK_SIZE_EXPONENT: u32 = 4;
pub const CHUNK_SIZE_EXPONENT: u32 = 8;
pub const CHUNK_SIZE: usize = (2 as usize).pow(CHUNK_SIZE_EXPONENT);
pub const MAX_TREE_DEPTH: usize = CHUNK_SIZE_EXPONENT as usize - 2;
pub const MIN_CHUNK_SIZE: usize = CHUNK_SIZE / (2 as usize).pow(MAX_TREE_DEPTH as u32);