Here is a terrain multitexture shader with 3 textures + normal maps, and a lightmap, and sun + 2 dynamic lights, and fog support:

link