bevy/crates/bevy_sprite/src/mesh2d
Robert Swain 479f43bbf3 Filter material handles on extraction (#4178)
# Objective

- While optimising many_cubes, I noticed that all material handles are extracted regardless of whether the entity to which the handle belongs is visible or not. As such >100k handles are extracted when only <20k are visible.

## Solution

- Only extract material handles of visible entities.
- This improves `many_cubes -- sphere` from ~42fps to ~48fps. It reduces not only the extraction time but also system commands time. `Handle<StandardMaterial>` extraction and its system commands went from 0.522ms + 3.710ms respectively, to 0.267ms + 0.227ms an 88% reduction for this system for this case. It's very view dependent but...
2022-05-03 18:28:04 +00:00
..
color_material.rs Make get_resource (and friends) infallible (#4047) 2022-02-27 22:37:18 +00:00
color_material.wgsl Add 2d meshes and materials (#3460) 2022-01-08 01:29:08 +00:00
material.rs Filter material handles on extraction (#4178) 2022-05-03 18:28:04 +00:00
mesh2d_struct.wgsl Move import_path definitions into shader source (#3976) 2022-02-18 21:54:03 +00:00
mesh2d_view_bind_group.wgsl Move import_path definitions into shader source (#3976) 2022-02-18 21:54:03 +00:00
mesh2d.wgsl Add 2d meshes and materials (#3460) 2022-01-08 01:29:08 +00:00
mesh.rs Move Size to bevy_ui (#4285) 2022-04-25 13:54:46 +00:00
mod.rs Add 2d meshes and materials (#3460) 2022-01-08 01:29:08 +00:00