bevy/crates/bevy_pbr/src
Patrick Walton 3188e5af61
Batch skinned meshes on platforms where storage buffers are available. (#16599)
This commit makes skinned meshes batchable on platforms other than WebGL
2. On supported platforms, it replaces the two uniform buffers used for
joint matrices with a pair of storage buffers containing all matrices
for all skinned meshes packed together. The indices into the buffer are
stored in the mesh uniform and mesh input uniform. The GPU mesh
preprocessing step copies the indices in if that step is enabled.

On the `many_foxes` demo, I observed a frame time decrease from 15.470ms
to 11.935ms. This is the result of reducing the `submit_graph_commands`
time from an average of 5.45ms to 0.489ms, an 11x speedup in that
portion of rendering.

![Screenshot 2024-12-01
192838](https://github.com/user-attachments/assets/7d2db997-8939-466e-8b9e-050d4a6a78ee)

This is what the profile looks like for `many_foxes` after these
changes.

![Screenshot 2024-12-01
193026](https://github.com/user-attachments/assets/68983fc3-01b8-41fd-835e-3d93cb65d0fa)

---------

Co-authored-by: François Mockers <mockersf@gmail.com>
2024-12-10 17:50:03 +00:00
..
cluster Cluster light probes using conservative spherical bounds. (#13746) 2024-12-05 13:07:10 +00:00
deferred Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
light ✏️ Fix typos across bevy (#16702) 2024-12-08 01:18:39 +00:00
light_probe Cluster light probes using conservative spherical bounds. (#13746) 2024-12-05 13:07:10 +00:00
lightmap Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
meshlet Batch skinned meshes on platforms where storage buffers are available. (#16599) 2024-12-10 17:50:03 +00:00
prepass Batch skinned meshes on platforms where storage buffers are available. (#16599) 2024-12-10 17:50:03 +00:00
render Batch skinned meshes on platforms where storage buffers are available. (#16599) 2024-12-10 17:50:03 +00:00
ssao Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
ssr Cluster light probes using conservative spherical bounds. (#13746) 2024-12-05 13:07:10 +00:00
volumetric_fog Fix error in volumetric fog shader (#16677) 2024-12-06 08:49:18 +00:00
bundle.rs Type safe retained render world (#15756) 2024-10-10 18:47:04 +00:00
extended_material.rs Make StandardMaterial bindless. (#16644) 2024-12-10 17:48:56 +00:00
fog.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
lib.rs Retain RenderMeshInstance and MeshInputUniform data from frame to frame. (#16385) 2024-12-05 21:16:04 +00:00
material.rs Make StandardMaterial bindless. (#16644) 2024-12-10 17:48:56 +00:00
material_bind_groups.rs Make StandardMaterial bindless. (#16644) 2024-12-10 17:48:56 +00:00
mesh_material.rs Revert default mesh materials (#15930) 2024-10-15 19:47:40 +00:00
parallax.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
pbr_material.rs Make StandardMaterial bindless. (#16644) 2024-12-10 17:48:56 +00:00
wireframe.rs Revert "Have EntityCommands methods consume self for easier chaining" (#15523) 2024-10-02 12:47:26 +00:00