A problem merging vertices in BufferGeometry

I’m assembling a mesh from raw vertex data and vertex indexes. The shape looks correct but the shading of it is flat. To make it smooth I tried to use BufferGeometryUtils.mergeVertices but the result looks odd, the right hemisphere normals seem to be rotated:

smooth_test

the line of code in question
geometry = BufferGeometryUtils.mergeVertices(geometry);

fiddle:
https://jsfiddle.net/tfoller/rqf8vxko/26/

Reverse the face winding in the right hemisphere.
They are inwards.

1 Like