Since UVs are now stored as 2D vectors in meshes, they can be copied directly to the vertex buffers. Somewhat surprisingly, multithreading the copying into the vertex buffer provides a good speedup-- on a CPU with many cores at least. Here is a test uploading two UV maps created in geometry nodes with a 1 million quad mesh, with a Ryzen 7950x: | | Before | After | Speedup | | ------- | ------- | ------ | ------- | | Average | 24.3 ms | 7.5 ms | 3.2x | | Min | 17.6 ms | 7.0 ms | 2.5x | I added the copying utilities to the array utils header, since the need for them has come up in a few different places already, and the existing function with a selection argument didn't make sense here. Pull Request: blender/blender#105793
1.7 KiB
1.7 KiB