You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each mesh instance, only store the previous frame's transform, not the entire MeshInputUniform. (#23892)
Currently, we copy the entire `MeshInputUniform`, which is 24 words, to
the previous mesh instance buffer. This is wasteful, as we only ever use
the transform for motion blur.
This patch fixes the issue by introducing a new type,
`PreviousMeshInputUniform`, that contains only the transform. Not only
does this improve performance, but it will also simplify future work to
sparsely update only the `MeshInputUniform` fields that changed.
On `bevy_city --no-cpu-culling`, this commit reduces
`write_previous_input_buffers` from a median time of 240.1 μs to 65.33
μs, a 3.68× speedup.
<img width="2756" height="1800" alt="Screenshot 2026-04-20 003301"
src="https://github.com/user-attachments/assets/35fa099d-4935-4af5-9b9c-99a3db570148"
/>
0 commit comments