Diffuse Mapping

Distant terrain is rendered with a pregenerated texture. This is for 2 reasons:
. Cuts down GPU processing for remote terrain.
. Renders trees and shrubs baked into the texture.

Near terrain is based on texture and various noise functions, while distant terrain is a baked texture

The diffuse terrain takes over as the tree billboards end so the illusion of trees can be continued. The diffuse texture is loaded as one of the RGBA tiles. Shading is done based on the terrain normal to allow for day night cycle.

Diffuse shading based on normal and shadow values

If the sun is below the two shadow values then it is given extra shading. Additionally, as the sun lowers below the horizon, the ambient light will reduce to give almost total darkness.

Section of a diffuse texture for the entire area

At a distance, water is rendered as part of the height map (as opposed to the water grid). This is to reduce z-buffer fighting problems. It is not baked into the diffuse texture because of the animation of the waves.

With and without the water grid, showing the heightmap interpolating to sea level