mirror of
https://github.com/bevyengine/bevy
synced 2024-12-14 15:22:30 +00:00
9a3225d3a8
# Objective - Add `Aabb` calculation for `Sprite`, `TextureAtlasSprite` and `Mesh2d`. - Enable frustum culling for 2D entities since frustum culling requires a `Aabb` component in the entity to function. - Improve 2D performance massively when there are many sprites out of view. (ex: `many_sprites`) ## Solution - Derived from @Weasy666's #3944 pull request, which had no activity since multiple months. - Adapted the code to the latest version of Bevy. - Added support for sprites with non-center `Anchor`s to avoid culling prematurely when part of the sprite is still in view or not culling when sprite is already out of view. ### Note - Gives 15.8x performance boosts in some scenarios. (5 fps vs 79 fps with 409600 sprites in `many_sprites`) --------- Co-authored-by: ira <JustTheCoolDude@gmail.com> |
||
---|---|---|
.. | ||
mesh2d | ||
render | ||
bundle.rs | ||
collide_aabb.rs | ||
dynamic_texture_atlas_builder.rs | ||
lib.rs | ||
sprite.rs | ||
texture_atlas.rs | ||
texture_atlas_builder.rs |