I know this is incredibly unhelpful and pointless, but I just wanted to say that in Hammer, there are certain materials that are a combination of two textures that let you use displacements to create a similar result to what is seen in the image above:
Of course, you probably already knew this, or you want to do it with Lua, not Hammer.
Sadly, I don’t know how this could be done (unless you somehow spawn a displaced surface).
[editline]1st September 2017[/editline]
I think the shader used for this is World Vertex Transition, or maybe Lightmapped 4 Way Blend