From a940630a271f68535eccad0c9883cbca829b1481 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sat, 22 Apr 2017 12:51:35 -0700 Subject: [PATCH] Reduced max bvh tree depth. Reduced from 64 to 42. This still allows each BVH to hold 4.4 trillion elements, but it guarantees that the accel ray's traversal bitstack can accommodate at least two nested max-depth trees. --- src/accel/bvh_base.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accel/bvh_base.rs b/src/accel/bvh_base.rs index 58e8b0a..56ed1dc 100644 --- a/src/accel/bvh_base.rs +++ b/src/accel/bvh_base.rs @@ -8,7 +8,7 @@ use math::log2_64; use super::objects_split::{sah_split, median_split}; -pub const BVH_MAX_DEPTH: usize = 64; +pub const BVH_MAX_DEPTH: usize = 42; /// An intermediary structure for creating a BVH. #[derive(Debug)]