Refactor dense ECS storage and align render hot paths with Bevy - #14
Merged
Conversation
Milky2018
marked this pull request as ready for review
July 22, 2026 02:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch combines the dense ECS table-column refactor with the performance and correctness work needed to use it in Bevy-shaped render hot paths.
Why
The previous ECS representation stored component columns as optional per-row slots and paid repeated wrapper, lookup, and change-tracking costs in render-critical queries. Several early optimizations exposed deeper semantic hazards around ownership, filtered write authority, table migration, and change detection. This branch makes the storage/query boundary dense and explicit, then migrates only validated performance-sensitive consumers.
The render follow-ups fix correctness gaps found during representative Bevy example captures rather than introducing visual heuristics or shader workarounds.
Impact
Performance-sensitive systems can traverse dense table columns in batches while retaining explicit read/write and change-tick semantics. Existing public API migrations and behavior changes are documented in the linked ISS records and generated interfaces.
This is intentionally a draft because the branch is large and should receive focused review across ECS storage/safety, visibility and transform propagation, render/PBR lifecycle, and dependency/binding changes.
Validation
git diff --check origin/main...HEADmoon test utils/utils_test.mbt --target native --release --deny-warn— 4/4 passed on the current default native backendexamples/3d/transmissionand the clearcoat multi-layer material path complete reproducibly after the WGSL 0.17 upgradedocs/issues, including many animated sprites, visibility, picking, shadows, PBR, and asset parity workexamples/3d/meshletnow compiles and captures without the former Moon compiler ICE; exact meshlet output remains blocked and is explicitly tracked by ISS-020Known remaining blockers
R64Uintatomic storage-texture supportmainon this macOS host, while Apple ASan does not support LeakSanitizer--deny-warnrun as green