bevy/crates/bevy_sprite/src/mesh2d
Patrick Walton 72ddac140a
Retain RenderMaterialInstances and RenderMeshMaterialIds from frame to frame. (#16985)
This commit makes Bevy use change detection to only update
`RenderMaterialInstances` and `RenderMeshMaterialIds` when meshes have
been added, changed, or removed. `extract_mesh_materials`, the system
that extracts these, now follows the pattern that
`extract_meshes_for_gpu_building` established.

This improves frame time of `many_cubes` from 3.9ms to approximately
3.1ms, which slightly surpasses the performance of Bevy 0.14.

(Resubmitted from #16878 to clean up history.)

![Screenshot 2024-12-17
182109](https://github.com/user-attachments/assets/dfb26e20-b314-4c67-a59a-dc9623fabb62)

---------

Co-authored-by: Charlotte McElwain <charlotte.c.mcelwain@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-01-22 03:35:46 +00:00
..
color_material.rs Remove all deprecated code (#16338) 2025-01-05 20:33:39 +00:00
color_material.wgsl Add AlphaMask2d phase (#14724) 2024-08-15 14:10:37 +00:00
material.rs Retain RenderMaterialInstances and RenderMeshMaterialIds from frame to frame. (#16985) 2025-01-22 03:35:46 +00:00
mesh2d_bindings.wgsl
mesh2d_functions.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh2d_types.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh2d_vertex_output.wgsl
mesh2d_view_bindings.wgsl add tonemapping LUT bindings for sprite and mesh2d pipelines (#13262) 2024-05-28 12:09:26 +00:00
mesh2d_view_types.wgsl
mesh2d.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
mesh.rs Use multi_draw_indirect_count where available, in preparation for two-phase occlusion culling. (#17211) 2025-01-14 21:19:20 +00:00
mod.rs Support wireframes for 2D meshes (#12135) 2024-03-29 18:34:04 +00:00
wireframe2d.rs Cleanup instances of #[allow(clippy::type_complexity)] (#17248) 2025-01-09 06:25:20 +00:00
wireframe2d.wgsl Support wireframes for 2D meshes (#12135) 2024-03-29 18:34:04 +00:00