Mix Terrain Shaders Through Slope and Altitude
These .blend files (one for 2.7x and one for 2.8 beta) contain two nodes that give you complete control over combining shaders for your landscapes using protrusions in geometry and altitude variations to produce realistic results. The settings are easy to use and understand, and the effects can be layered as many times as needed for your scenes.
Mixing Based on Slope
This node allows you to combine shaders using the angle of a given slope; additional detail can be incorporated through regional slope data taken from mesh geometry. This works for a variety of terrain types, including rocks poking out from under a cover of snow, dirt clumps between stretches of grass, ice jutting out of jagged cliffs, and numerous others (in which, even when applied subtly, realism is noticeably improved).
Mixing Based on Altitude
Multiple shaders can be layered at different heights using this node. Not only do you have control over the sharpness and height at which the shaders are combined, but there is also a turbulence setting that breaks up the uniformity of the smooth gradient-type mixing.
This download includes the two nodes applied to a sample terrain (combining simple black and white diffuse shaders) as well as a short PDF documenting the settings (the same as seen under Documentation on this product page). **Note that these nodes are designed to control the combination of other shaders, and are not complete terrain shaders in and of themselves.**