Improve update_mesh_previous_global_transforms() performance
- Using try_insert for every entity is expensive. We should have a system to first add PreviousGlobalTransform to entities missing it, and then a second system to update the value. Or something like that.
- When using the meshlet feature, but no motion vector prepass, Mesh entities unnecessarily get a PreviousGlobalTransform. Not really worth fixing imo, as you probably want to use TAA with meshlets anyways, but I'm making a note of it here.
I would like to complete this task, but I'm not sure if it will conflict with your current work.
Feel free to, it won't conflict with any active work that I know of. The only reason I haven't done it myself is that I don't have a computer to benchmark on atm.
Another option would be to include PreviousGlobalTransform in MeshMaterialBundle behind a cargo feature, instead of having a system to add it to entities that don't have it.
With required components, I'm tempted to make PreviousGlobalTransform required for MeshletMesh3d. How to solve this for the general case, idk yet.