Drawing outlines on terrain; how?

I have a simple terrain (just a flat plane I generate). My game is grid based, and I would like to draw lines on the terrain to separate sections of the grid (the player would actually). I want an effect like this:

47536-so-example.png

Pretend the image is the terrain. I want to be able to project the red lines on the terrain without the thickness of the lines being affected by changes in the size of the terrain, or underlying texture (very similar to how GridProjector works). Essentially, I want the player to be able to outline areas of the terrain, persistently (not just on a mouse drag and it goes away).

I want to avoid using projectors (unless it is a single one) due to the overhead (there could be hundreds of these on a map). I thought about using a splat map, but I fear that would be too resolution dependent.

What are some ways to go about this?

I wrote a grid shader a couple of years back… rummages through the Internet… yes, here it is: http://forum.unity3d.com/threads/wireframe-grid-shader.60071/

Don’t know if it will work out-of-the-box for terrain, but it certainly shouldn’t be too hard to adapt, and that should give you the best performing method as it’s done purely in a single shader.