There are some options to do this in the Heightfield Shader, under its Colour tab. Enable Apply colour and shade and Shade by height. This gives you a greyscale value between black and white that can be used as a blend shader or a function input just like any other colour shader.
Matt