Hi guys,

I have been searching though the forums and documentation for a while now but cant figure it out.

I'm working on a desert rock material and I want to make it so that the material detects where it intersects with other meshes, so I can use it for a Sandmask.
There is already a z-axis and crevasse mask in there. If I add this Material and connect a vertex paint system in there it would save us a lot of time.

Result:http://gyazo.com/be5e9781b248268a98166461f9e3edd4
Material:http://gyazo.com/b43949437d67486406c8c0091af731ad

Any other tips and crits are very welcome!

P.S.
The specular needs some work. I want the sand to be nice and shiny but not too much (Journey is an obvious example). The problem at the moment is that blend between the sand and rock texture is too soft.