Skip to content

Conversation

@DeVelox
Copy link

@DeVelox DeVelox commented Nov 5, 2025

Objective

  • Test the impact that many overlapping cubes, all within the camera frustum, have on visibility/occlusion calculations, especially with continuous rotation and shadows enabled.

Solution

  • Add a dense cube layout using a static camera, and a toggle for individual cube rotation.

Testing

  • I ran the test in several stages, each causing a considerable performance drop.
    • Stage 1: using just the dense layout.
    • Stage 2: using the dense layout with rotation or shadows enabled.
    • Stage 3: using the dense layout with both rotation and shadows enabled.
cargo run --release --example many_cubes -- --layout dense --rotate-cubes --shadows

Showcase

image

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@laundmo
Copy link
Contributor

laundmo commented Nov 5, 2025

We talked about this on discord, there seems to be some inefficiency with the visibility calculations, according to traces shared by @DeVelox in https://github.com/DeVelox/many_cubes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants