# A problem merging vertices in BufferGeometry

**URL:** <https://discourse.threejs.org/t/a-problem-merging-vertices-in-buffergeometry/32524>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [December 9, 2021, 5:36pm UTC](https://discourse.threejs.org/t/a-problem-merging-vertices-in-buffergeometry/32524 "2021-12-09T17:36:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfoller](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@tfoller](https://discourse.threejs.org/u/tfoller)\
**Post date:** [December 9, 2021, 5:36pm UTC](https://discourse.threejs.org/t/a-problem-merging-vertices-in-buffergeometry/32524/1 "2021-12-09T17:36:34Z")

</div>

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](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/3/d3bf070c66e9987357227a7d9d0388b18cc2a073.png)

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

fiddle:  
[https://jsfiddle.net/tfoller/rqf8vxko/26/](https://jsfiddle.net/tfoller/rqf8vxko/26/)

---

<div class="post-metadata">

**Author:** ![rrrr\_rrrr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/rrrr_rrrr/32/7697_2.png) [@rrrr\_rrrr](https://discourse.threejs.org/u/rrrr_rrrr)\
**Post date:** [December 9, 2021, 10:11pm UTC](https://discourse.threejs.org/t/a-problem-merging-vertices-in-buffergeometry/32524/2 "2021-12-09T22:11:18Z")

</div>

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