Sculpt: Remove some normal calculation with deformed sculpting

Remove unnecessary (and No-op) normal calculation when sculpting on top
of deformed coordinates. Examples are shape keys and deform modifiers.
On a 1 million face mesh, this saved 100ms per stroke update.
This function actually did nothing since cfa53e0fbe,
so that large improvement comes for free.

Conceptually this is correct because when sculpting on deformed
coordinates, we don't change the positions of the base mesh directly.
In the future it might be better to allocate a separate array for
normals when using deformed coordinates, but it's not clear that's
necessary yet.
This commit is contained in:
2022-11-16 18:22:09 -06:00
parent c481549870
commit bf0180d206
3 changed files with 0 additions and 63 deletions

View File

@@ -472,12 +472,6 @@ void BKE_mesh_calc_normals(struct Mesh *me);
* Called after calculating all modifiers.
*/
void BKE_mesh_ensure_normals_for_display(struct Mesh *mesh);
void BKE_mesh_calc_normals_looptri(const struct MVert *mverts,
int numVerts,
const struct MLoop *mloop,
const struct MLoopTri *looptri,
int looptri_num,
float (*r_tri_nors)[3]);
/**
* Define sharp edges as needed to mimic 'autosmooth' from angle threshold.