The sharpen mesh filter works by accumulating displacement from each
vertex into the neighbors. This does not work with the current sculpt
API and multires implementation:
- When iterating over all vertices by the indices, duplicate grid's vertices accumulate the displacement into their neighbors multiple times
- When accumulating into a neighbor vertex thas has duplicates it does not accumulate into all duplicates
To solve the first issue I implemented a function that returns true only
for one index of each duplicate vertex. This way it is possible to
iterate over all vertices taking duplicates only once into account.
For the next step it will require to change how SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER works as it needs to return
the duplicates of each neighbor in all grids.
Do you think this is the right solution or can this be fixed in an easier way?