What is the method used in overlaying a grid (agonostic of the grid type) on to a height map? It seems it's some sort of projection, but what are the technical details in how to implement it?
Deferred decals are a common way to achieve this without re-rendering the same geometry. It also allows you to change the appearance, i.e. add some gap or smooth out the details.
- Draw a box around your height field, the size should be as tight as possible to avoid over draw.
- sample the depth buffer to get the world-space position of the current pixel (the height field / other geo)
- Project your box down in world space
- Use the projected box coordinate to sample from your overlay texture.