bevy/crates/bevy_render/src
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
..
batching Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
camera Introduce methods on QueryState to obtain a Query (#15858) 2025-02-05 18:33:15 +00:00
diagnostic Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
experimental Implement occlusion culling for directional light shadow maps. (#17951) 2025-02-21 05:56:15 +00:00
mesh Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
primitives Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
render_graph Implement experimental GPU two-phase occlusion culling for the standard 3D mesh pipeline. (#17413) 2025-01-27 05:02:46 +00:00
render_phase Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
render_resource 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
renderer Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
texture Allowed creating uninitialized images (for use as storage textures) (#17760) 2025-02-10 22:22:07 +00:00
view Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
alpha.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
bindless.wgsl Use global binding arrays for bindless resources. (#17898) 2025-02-21 05:55:36 +00:00
color_operations.wgsl
extract_component.rs Improved Spawn APIs and Bundle Effects (#17521) 2025-02-09 23:32:56 +00:00
extract_instances.rs Move Resource trait to its own file (#17469) 2025-01-21 19:47:08 +00:00
extract_param.rs Implement WorldQuery for MainWorld and RenderWorld components (#15745) 2024-10-13 20:58:46 +00:00
extract_resource.rs Fix "Unrecognized Option" error when using Criterion-specific arguments in benchmarks (#17222) 2025-01-08 00:09:31 +00:00
globals.rs Weak handle migration (#17695) 2025-02-05 22:44:20 +00:00
globals.wgsl
gpu_component_array_buffer.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
gpu_readback.rs Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
lib.rs Use global binding arrays for bindless resources. (#17898) 2025-02-21 05:55:36 +00:00
maths.wgsl Atmosphere LUT parameterization improvements (#17555) 2025-02-03 21:52:11 +00:00
pipelined_rendering.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
render_asset.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
settings.rs Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
storage.rs Add a bindless mode to AsBindGroup. (#16368) 2024-12-03 18:00:34 +00:00
sync_component.rs Refactored ComponentHook Parameters into HookContext (#17503) 2025-01-23 02:45:24 +00:00
sync_world.rs Retain bins from frame to frame. (#17698) 2025-02-08 20:13:33 +00:00