Gradient map shader
From C4 Engine Wiki
Remapping input intensity to a two-color gradient output
Click image to view full resolution.
For interesting variations, the constant color nodes can be replaced with texture map nodes to create a blend between textures rather than plain colors.
NB: calculate linear intensity is not necessary for Grayscale source (R=G=B -> (R+G+B)/3 = R or G or B).
