mirror of
https://github.com/bevyengine/bevy
synced 2024-12-21 02:23:08 +00:00
1523c38ce8
# Objective Following #4402, extract systems run on the render world instead of the main world, and allow retained state operations on it's resources. We're currently extracting to `ExtractedJoints` and then copying it twice during Prepare. Once into `SkinnedMeshJoints` and again into the actual GPU buffer. This makes #4902 obsolete. ## Solution Cut out the middle copy and directly extract joints into `SkinnedMeshJoints` and remove `ExtractedJoints` entirely. This also removes the per-frame allocation that is being made to send `ExtractedJoints` into the render world. ## Performance On my local machine, this halves the time for `prepare_skinned _meshes` on `many_foxes` (195.75us -> 93.93us on average). ![image](https://user-images.githubusercontent.com/3137680/205427455-ab91a8a3-a6b0-4f0a-bd48-e54482c563b2.png) --- ## Changelog Added: `BufferVec::truncate` Added: `BufferVec::extend` Changed: `SkinnedMeshJoints::build` now takes a `&mut BufferVec` instead of a `&mut Vec` as a parameter. Removed: `ExtractedJoints`. ## Migration Guide `ExtractedJoints` has been removed. Read the bound bones from `SkinnedMeshJoints` instead. |
||
---|---|---|
.. | ||
clustered_forward.wgsl | ||
depth.wgsl | ||
light.rs | ||
mesh.rs | ||
mesh.wgsl | ||
mesh_bindings.wgsl | ||
mesh_functions.wgsl | ||
mesh_types.wgsl | ||
mesh_vertex_output.wgsl | ||
mesh_view_bindings.wgsl | ||
mesh_view_types.wgsl | ||
mod.rs | ||
pbr.wgsl | ||
pbr_bindings.wgsl | ||
pbr_functions.wgsl | ||
pbr_lighting.wgsl | ||
pbr_types.wgsl | ||
shadows.wgsl | ||
skinning.wgsl | ||
utils.wgsl | ||
wireframe.wgsl |