Merge pull request #17 from eliasstepanik/codex/remove-max-view-distance-for-lod

Disable chunk culling
This commit is contained in:
Elias Stepanik 2025-06-09 18:57:59 +02:00 committed by GitHub
commit 2f7128c55f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,5 @@
use bevy::app::{App, Plugin, PreStartup, PreUpdate, Startup}; use bevy::app::{App, Plugin, PreStartup, PreUpdate, Startup};
use bevy::prelude::*; use bevy::prelude::*;
use crate::plugins::environment::systems::voxels::culling::{despawn_distant_chunks};
use crate::plugins::environment::systems::voxels::debug::{draw_grid, visualize_octree_system}; use crate::plugins::environment::systems::voxels::debug::{draw_grid, visualize_octree_system};
use crate::plugins::environment::systems::voxels::queue_systems; use crate::plugins::environment::systems::voxels::queue_systems;
use crate::plugins::environment::systems::voxels::queue_systems::{enqueue_visible_chunks, process_chunk_queue}; use crate::plugins::environment::systems::voxels::queue_systems::{enqueue_visible_chunks, process_chunk_queue};
@ -40,9 +39,8 @@ impl Plugin for EnvironmentPlugin {
Update, Update,
( (
/* ---------- culling & streaming ---------- */ /* ---------- culling & streaming ---------- */
despawn_distant_chunks, // 1. remove too-far chunks enqueue_visible_chunks,
enqueue_visible_chunks.after(despawn_distant_chunks), // 2. find new visible ones process_chunk_queue.after(enqueue_visible_chunks),
process_chunk_queue .after(enqueue_visible_chunks), // 3. spawn ≤ budget per frame
update_chunk_lods.after(process_chunk_queue), update_chunk_lods.after(process_chunk_queue),
rebuild_dirty_chunks .after(process_chunk_queue), // 4. (re)mesh dirty chunks rebuild_dirty_chunks .after(process_chunk_queue), // 4. (re)mesh dirty chunks