How can I colour my terrain using a colour gradient based on the elevation?

Here’s a way to do it using a 1D texture lookup. You take the Z position, subtract the minimum height, divide it by the height range, clamp it in the range (0,1) and use that as UVs for your texture.

I don’t know if BreakOutFloat3Components is preferable versus using a ComponentMask here; both allow you to pick out just the Z channel, and both yield the same stats, but perhaps one is more performant.

1 Like