I am writing an MD5 3D model loader to display animated models. The vertices and texcoords load in correctly, but the lighting is supposed to be smooth. I calculate per-vertex normals by looping through all triangles, finding the triangle normal, and then adding that to each of the triangle's vertices' normal (follow?). Then, I normalize all the normals. This should work, but md5 declares each vertex with a texcoord, meaning that if I have a single vertex that has different texcoords for each of the faces it's attached to, it declares multiple vertices at the same position. Each of these will end up with its own normal, resulting in flat shading. Should I somehow merge duplicate vertices, or export the model differently, or do something fancy that I haven't thought of?