I have no problem with manipulating the mesh itself,but each tile(which is basically a square of 4 vertices and the whole terrain mesh is made of a grid of tiles)has to be able to be given a different texture of my choosing.So far I can only give the mesh 1 texture and make it repeat itself by changing the UV values of the CUSTOMVERTEX-es in the vertex buffer.I can't however make different tile textures like here:http://classic.battle.net/war3/images/neutral/heroes/ss02.jpg -you can see that there are grass tiles and some dirt tiles on the side and some gravel to the left. I had the stupid idea of making each tile a seperate mesh,but that was just..heavier and the textures didnt clamp well.I'm sure there has to be some function to let me texture seperate squares of the terrainmesh Thanks in advance for anyone who helps!
You want to add an additional component to your vertex format declaration so that you can store per-vertex weights of each splat-texture. This even allows you to slowly blend between multiple textures to get smooth overlaps.
I use the height of each vertex in my mesh to determine the blend factor (blending between 3 textures i.e. grass, rock, and snow for dynamic terrain) and then add that to my vertex format struc but you can also use a blend map that determines which texture sampler to pull the color from in the pixel shader.