bevy/crates
Patrick Walton 5d7a60592d
Add a new #[data] attribute to AsBindGroup that allows packing data for multiple materials into a single array. (#17965)
Currently, the structure-level `#[uniform]` attribute of `AsBindGroup`
creates a binding array of individual buffers, each of which contains
data for a single material. A more efficient approach would be to
provide a single buffer with an array containing all of the data for all
materials in the bind group. Because `StandardMaterial` uses
`#[uniform]`, this can be notably inefficient with large numbers of
materials.

This patch introduces a new attribute on `AsBindGroup`, `#[data]`, which
works identically to `#[uniform]` except that it concatenates all the
data into a single buffer that the material bind group allocator itself
manages. It also converts `StandardMaterial` to use this new
functionality. This effectively provides the "material data in arrays"
feature.
2025-02-24 21:38:55 +00:00
..
bevy_a11y Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_animation Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_app Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_asset Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_audio Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_color Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_core_pipeline Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_derive Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_dev_tools Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_diagnostic Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_dylib Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_ecs implement UniqueEntityArray (#17954) 2025-02-24 21:36:59 +00:00
bevy_encase_derive Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_gilrs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_gizmos Incorporate OIT into MeshPipelineKey used by the LineGizmoPipeline (#17946) 2025-02-24 21:31:54 +00:00
bevy_gltf Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_image Load and convert RGB8 dds textures (#12952) 2025-02-24 20:45:56 +00:00
bevy_input Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_input_focus Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_internal Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_log Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_macro_utils Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_math Add core Error to InvalidDirectionError (#17820) 2025-02-24 21:04:22 +00:00
bevy_mesh Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_mikktspace Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_pbr Add a new #[data] attribute to AsBindGroup that allows packing data for multiple materials into a single array. (#17965) 2025-02-24 21:38:55 +00:00
bevy_picking Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_platform_support Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_ptr Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_reflect Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_remote Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_render Add a new #[data] attribute to AsBindGroup that allows packing data for multiple materials into a single array. (#17965) 2025-02-24 21:38:55 +00:00
bevy_scene Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_sprite Add uv_transform to ColorMaterial (#17879) 2025-02-24 21:17:26 +00:00
bevy_state Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_tasks Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_text Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_time Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_transform Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_ui Remove camera from UiBatch (#17663) 2025-02-24 20:55:30 +00:00
bevy_utils Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_window Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_winit Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00