Skip to content

Commit

Permalink
Re-introduce traces for culling
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett committed Dec 4, 2024
1 parent ffaae04 commit fe2c8ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/render/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::render::extract::ExtractedFrustum;
use crate::{
prelude::TilemapGridSize, render::RenderChunkSize, render::SecondsSinceStartup, FrustumCulling,
};
use bevy::log::trace;
use bevy::prelude::{InheritedVisibility, Resource};
use bevy::render::mesh::MeshVertexBufferLayouts;
use bevy::render::sync_world::TemporaryRenderEntity;
Expand Down Expand Up @@ -177,6 +178,7 @@ pub(crate) fn prepare(

for chunk in chunk_storage.iter_mut() {
if !chunk.visible {
trace!("Visibility culled chunk: {:?}", chunk.get_index());
continue;
}

Expand All @@ -185,6 +187,7 @@ pub(crate) fn prepare(
.iter()
.any(|frustum| chunk.intersects_frustum(frustum))
{
trace!("Frustum culled chunk: {:?}", chunk.get_index());
continue;
}

Expand Down

0 comments on commit fe2c8ac

Please sign in to comment.