diff options
Diffstat (limited to 'stockton-render/src/culling.rs')
-rw-r--r-- | stockton-render/src/culling.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/stockton-render/src/culling.rs b/stockton-render/src/culling.rs index f8366e6..8ee2877 100644 --- a/stockton-render/src/culling.rs +++ b/stockton-render/src/culling.rs @@ -27,12 +27,17 @@ use stockton_types::Vector3; pub fn get_visible_faces<X: CoordSystem, T: MinBSPFeatures<X>>(pos: Vector3, file: &T) -> Vec<u32> { let vis_cluster = get_cluster_id(pos, file); + let mut visible = Vec::with_capacity(file.faces_len() as usize); if (vis_cluster & 0x80000000) != 0 { // Negative = Invalid camera position - return vec![]; + // For now just render everything + for face_idx in 0..file.faces_len() { + visible.push(face_idx); + } + + return visible; } - let mut visible = Vec::with_capacity(file.faces_len() as usize); walk_bsp_tree(file.get_bsp_root(), vis_cluster, &mut visible, file); visible |