After watching this UDK vid, I wondered if I could write a simple shader for Unity to do the same, one that would hopefully also work on SM2.0 hardware.
I extended the parallax specular bump shader to use the heightmap of a material to determine whether or not to blend a second material onto it, so it appears that the depressed areas of the first material are filled in with the second material. To decide the area covered by the second material, I used the red channel of the vertex colour.
The results so far:
The following vertex colours:
yields:
And the shader just fits into the 64 instruction limit, with parallax of the first material.
there is a tool that already exist to do so. thread from reissgrant and another one from werewraith. extended with 3 vertex colors for blending material
As Werewraith(whose blending demo is gorgeous, and does seem to be able to achieve the same effect - does it take depth into account?) says, this shader fills in the depressions of the primary material with the secondary material, allowing modelling of sand or snow on a hard surface. Maybe I didn’t make that clear enough. Further materials could be added, but not within the 64 instruction limit of SM 2.0, especially as the hard surface material really needs parallax offset mapping to increase the illusion of depth.
I was thinking it could be used with Reissgrant’s vertex painter tool to allow painting of sand/snow in the editor in realtime.