diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-20 06:21:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-20 07:39:13 +0300 |
commit | 513f566b40a5bde4d89797aecf7c0ad3e4d1a20b (patch) | |
tree | 40949ae61aef858a7e3f8710abdc56f4e7da4f70 /source/blender/blenkernel/BKE_mesh.h | |
parent | b5e5fbcfc81b6ca4968d0788b5e6e330205d298b (diff) |
Mesh: optimize object mode face tessellation
- Multi-thread BKE_mesh_recalc_looptri.
- Add BKE_mesh_recalc_looptri_with_normals,
this skips having to calculate normals for ngons.
Exact performance depends on number of faces, size of ngons and
available CPU cores.
For high poly meshes the isolated improvement to BKE_mesh_recalc_looptri
in my tests was between 6.7x .. 25.0x, with the largest gains seen in
meshes containing ngons with many sides.
The overall speedup for high poly meshes containing quads and triangles
is only ~20% although ngon heavy meshes can be much faster.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 81d3fc683b7..87964307105 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -297,6 +297,13 @@ void BKE_mesh_recalc_looptri(const struct MLoop *mloop, int totloop, int totpoly, struct MLoopTri *mlooptri); +void BKE_mesh_recalc_looptri_with_normals(const struct MLoop *mloop, + const struct MPoly *mpoly, + const struct MVert *mvert, + int totloop, + int totpoly, + struct MLoopTri *mlooptri, + const float (*poly_normals)[3]); /* *** mesh_evaluate.c *** */ |