Blend By Height Sample
This material graph sample demonstrates how to perform blending based on heightmaps when creating materials.
Texture coordinates taken via the Vertex UV 0 node are multiplied by the first two components of the UV Transform float4 parameter, representing UV tiling adjustment, and increased by its last two components that represent a UV offset. The modified UV coordinates are connected to all Sample Texture nodes via portals for ease of access.
Two height values sampled from the corresponding textures in accordance with the modified UVs are passed to the Blend By Height node. Height 0 Scale, Height 1 Scale, and Contrast values are taken from parameter Sliders enabling you to adjust these values via the Parameters panel.
The Result Height is connected to the Tessellation Vertex Offset Tangent Space port of the material via the 0,0,x port adapter (meaning that the value shall control displacement along the Z-axis only, keeping X and Y as they are). The Result Blend Mask is used as a blending coefficient for the Lerp nodes performing linear interpolation between two sets of Albedo and tangent-space Normal textures.