As nz0 said:
Quote: " Doesn't the supplied terrain demo use a shader to for the height textures?"
Yes it does:
// load terrain detail texture with mipmapping enabled
SetGenerateMipmaps(1)
TerrainImageID=LoadImage( "detail.png" )
SetImageWrapU( TerrainImageID, 1 )
SetImageWrapV( TerrainImageID, 1 )
// load the terrain shader to give the terrain color based on height
TerrainShaderID=LoadShader("Terrain.vs", "Terrain.ps" )
global TerrainObjectID
// create the terrain object from a height map
TerrainObjectID=CreateObjectFromHeightMap( "YellowStone.png", 768, 50, 768, 4, 16 )
SetObjectImage( TerrainObjectID, TerrainImageID, 0 )
SetObjectUVScale( TerrainObjectID, 0, 256, 256 ) // scale the detail texture so it repeats
SetObjectShader( TerrainObjectID, TerrainShaderID )