Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-08 08:54:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-08 10:13:15 +0300
commit496045fc30f72be8d2ca32394ed233266f043152 (patch)
treeef4302fc0ec3c4b57c04d0ffdc884fb5a986f98c /source/blender/editors/mesh/editmesh_undo.c
parentf651cc6c4eda0764b085f824a42e0d407b258705 (diff)
BMesh: simplify normal calculation, resolve partial update error
Simplify vertex normal calculation by moving the main normal accumulation function to operate on vertices instead of faces. Using faces had the down side that it needed to zero, accumulate and normalize the vertex normals in 3 separate passes, accumulating also needed a spin-lock for thread since the face would write it's normal to all of it's vertices which could be shared with other faces. Now a single loop over vertices is performed without locking. This gives 5-6% speedup calculating all normals. This also simplifies partial updates, fixing a problem where all connected faces were being read from when calculating normals. While this could have been resolved separately, it's simpler to operate on vertices directly.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_undo.c')
0 files changed, 0 insertions, 0 deletions