Give the terrain grass, soil, rock and snow: textures painted in code into a texture array, projected from three sides in a GLSL shader, and chosen by slope, height and how deep below the ground a spot lies.