Landscape Height-Based Coloring


HeightBasedLandscape.rar [152Kb] – C# 2.0 (VS.NET 2005)


A über-simple landscape shader that maps a color ramp to a landscape’s height. Basically, it demonstrates that shaders on landscapes is possible, and can be a nice addition to a visual landscape editor.


  • Shader Model 1.4-compatible
  • 1D texture usage
  • Works with any terrain scale
  • Features two ramps, one greyscale and the other colored, but other ones can be made
  • Very fast, but of course because it’s very simple…


2 thoughts on “Landscape Height-Based Coloring”

  1. I like this approach for blending terrain textures based on the color mask, but what about adding slope as part of the coloration process? Neighbor pixel sampling or…?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.