Mesh: Use attribute API in merge by distance code
Split the result mesh generation to work into two loops. The first loop builds topology maps used for propagating attribute values, and the next loop mixes attribute values with those maps. This has a few benefits: The propagation can be done in parallel, and the topology mapping code can get simpler. Also, we reduce the overhead that comes with iterating over all attributes for every single element. Overall I didn't measure a large performance difference though, because the new code has the downside of needing to allocate two more arrays. There is a small difference of a propagated byte color (250 vs. 251) in the geometry nodes test due to a subtle difference in the mixing implementation. Part of #122398. Pull Request: https://projects.blender.org/blender/blender/pulls/147367
This commit is contained in:
BIN
tests/files/modeling/geometry_nodes/geometry/merge_by_distance.blend
(Stored with Git LFS)
BIN
tests/files/modeling/geometry_nodes/geometry/merge_by_distance.blend
(Stored with Git LFS)
Binary file not shown.
Reference in New Issue
Block a user