bevy/crates
JMS55 ad011d0455
Add GpuArrayBuffer and BatchedUniformBuffer (#8204)
# Objective

- Add a type for uploading a Rust `Vec<T>` to a GPU `array<T>`.
- Makes progress towards https://github.com/bevyengine/bevy/issues/89.

## Solution

- Port @superdump's `BatchedUniformBuffer` to bevy main, as a fallback
for WebGL2, which doesn't support storage buffers.
- Rather than getting an `array<T>` in a shader, you get an `array<T,
N>`, and have to rebind every N elements via dynamic offsets.
- Add `GpuArrayBuffer` to abstract over
`StorageBuffer<Vec<T>>`/`BatchedUniformBuffer`.

## Future Work
Add a shader macro kinda thing to abstract over the following
automatically:
https://github.com/bevyengine/bevy/pull/8204#pullrequestreview-1396911727

---

## Changelog
* Added `GpuArrayBuffer`, `GpuComponentArrayBufferPlugin`,
`GpuArrayBufferable`, and `GpuArrayBufferIndex` types.
* Added `DynamicUniformBuffer::new_with_alignment()`.

---------

Co-authored-by: Robert Swain <robert.swain@gmail.com>
Co-authored-by: François <mockersf@gmail.com>
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
Co-authored-by: Vincent <9408210+konsolas@users.noreply.github.com>
Co-authored-by: robtfm <50659922+robtfm@users.noreply.github.com>
2023-07-21 16:46:56 +00:00
..
bevy_a11y Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_animation Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_app delete code deprecated in 0.11 (#9128) 2023-07-13 23:35:06 +00:00
bevy_asset impl From<&AssetPath> for HandleId (#9132) 2023-07-15 21:32:17 +00:00
bevy_audio Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_core fix clippy::default_constructed_unit_structs and trybuild errors (#9144) 2023-07-13 22:23:04 +00:00
bevy_core_pipeline Return URect instead of (UVec2, UVec2) in Camera::physical_viewport_rect (#9085) 2023-07-15 21:25:22 +00:00
bevy_derive Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_diagnostic Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_dylib Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_dynamic_plugin Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_ecs replace parens with square brackets when referencing _mut on Query docs #9200 (#9223) 2023-07-20 21:41:07 +00:00
bevy_ecs_compile_fail_tests Resolve clippy issues for rust 1.70.0 (#8738) 2023-06-01 21:05:05 +00:00
bevy_encase_derive Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_gilrs Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_gizmos Fix gizmo draw order in 2D (#9129) 2023-07-15 21:18:13 +00:00
bevy_gltf Add GltfLoader::new. (#9120) 2023-07-13 23:54:59 +00:00
bevy_hierarchy Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_input Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_internal fix clippy::default_constructed_unit_structs and trybuild errors (#9144) 2023-07-13 22:23:04 +00:00
bevy_log Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_macro_utils Add some more helpful errors to BevyManifest when it doesn't find Cargo.toml (#9207) 2023-07-19 12:05:04 +00:00
bevy_macros_compile_fail_tests bevy_derive: Add #[deref] attribute (#8552) 2023-05-16 18:29:09 +00:00
bevy_math Return URect instead of (UVec2, UVec2) in Camera::physical_viewport_rect (#9085) 2023-07-15 21:25:22 +00:00
bevy_mikktspace Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_pbr Register AlphaMode type (#9222) 2023-07-20 21:26:03 +00:00
bevy_ptr Put #[repr(transparent)] attr to bevy_ptr types (#9068) 2023-07-14 18:55:15 +00:00
bevy_reflect Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_reflect_compile_fail_tests fix clippy::default_constructed_unit_structs and trybuild errors (#9144) 2023-07-13 22:23:04 +00:00
bevy_render Add GpuArrayBuffer and BatchedUniformBuffer (#8204) 2023-07-21 16:46:56 +00:00
bevy_scene Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_sprite Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_tasks fix clippy::default_constructed_unit_structs and trybuild errors (#9144) 2023-07-13 22:23:04 +00:00
bevy_text Fix for vertical text bounds and alignment (#9133) 2023-07-13 23:35:32 +00:00
bevy_time Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_transform Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_ui Fix UI corruption for AMD gpus with Vulkan (#9169) 2023-07-19 07:29:14 +00:00
bevy_utils Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_window Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_winit Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00