Hello,
First of all I wasn't sure whether to post here or in graphics forums; it's related to graphics but problem is general programming.
I need to calculate normals for heightmap (I know how it's done), however my heightmaps are stored separately (a lot of 128x128), so if I calculate normals individually they won't connect well where heightmaps join. I store heightmap data in this structure:
struct HeightmapData {
XMVECTOR positions[constant][constant];
XMVECTOR triangleNormals[constant][constant];
XMVECTOR vertexNormals[constant][constant];
};
Currently I have function vector<Vertex*> getVertex(int x, int z) which loops through all heightmaps, finds all vertexes at (x,z) (they duplicate where heightmaps connect) and returns them, allowing me to basically unite all heightmaps into one big one. However that's extremely slow. Can anyone suggest a better way to correctly calculate normals between heightmaps?
Thank you in advance.

Find content
Male