The way the shader/alpha maps work:

They take the first texture, and tile it on top of your entire terrain. Then they tile the 2nd texture over the first texture. Then, they take the alpha map, and stretch onto the entire terrain, so that it covers everything but does not tile. The alpha map then determines what parts of the second texture are transparent and what parts are not. White is solid, while black is completely see through. Any shades of gray inbetween are their appropriate transparency values - it is all linear. The 1st texture shows through the parts of the 2nd texture which are transparent from the alpha map.

Thus, if you made grass as your first texture, sand as your 2nd, and made an alpha map with a giant white dot in the middle, your terrain would show up as a large grassy terrain, with a sandy dot in the middle.

Of course, most shaders have even another texture layer, whichs acts like the 2nd layer, only its alpha map blends everything below it. (Thus both the 1st and 2nd texture). Make sense?

Such power allows you to add patches of other textures, very detailed paths, and so on. It is quite powerful.


--Eric