I have a large terrain mesh with associated heightmap. I want to splat some local detail on it (small areas of higher definition, high res height variances, village footprints etc).
Currently I do a multi-pass render of the mesh and heightmap, passing in my local information as an extra texture with the World Coordinates that the texture applies to. I just Clip() in the pixel shader if the current pixel world coordinates do not fall within my rectangle of interest containing the locally interesting data.
In this way I pass in the (for instance) village footprint (paths, and other local textures specific to the village) and splat it onto the landscape mesh.
However I need to execute a landscape mesh render once for each texture splat I carry out, after frustum culling the areas of interest. This doesn't cause me any performance problems at present, but I'm wondering if this is a good candidate for introducing a Geometry Shader step into my pipeline ? I am aggrieved that I have to execute the landscape mesh render once for each texture I want to splat, knowing the vast majority of vertexes dont actually cover the texture splat world rectangle.
My understanding would be that I could intercept the landscape mesh render in the GS and test each vertex against its overlap with the particular area I am rendering, and add it to the output stream only if that vertex actually covers my area of interest. In this case I would then only render the mesh vertexes that actually overlap my area of interest, saving a whole bunch of dead triangle renders for all the visible areas that are not covered by my texture splat.
Is this a reasonable approach, and would it actually save any rendering time do you think ?