I would, in the vertex shader, use the vertex's u,v coordinates converted to screen-space for rendered position, so that this trick could be used for any model (not just a terrain).
I guess I'd have a function that, given an entity, will create a view that targets its skin, assign your clever shader to the view, and use a material event to make sure only the entity concerned gets rendered (perhaps using and analysing that view's genius?). wait(1). Then remove the view.
That's the theory, anyway. I'd love to give it a go, but I'm otherwise occupied
