I'm using a 2D lookup table where i encode U as the slope of the terrain, and V as the altitude. This table is pre-generated on the CPU, and so far only contains 4 constant colors (for a quick test).
In the pixel shader, i sample the terrain and get the normal / altitude. I then use normal.y as the cosinus of the slope angle to do the lookup.
It's a very quick test and will only improve as i add more shades of colors and better parameters.
Ultimately, i think i will try not to encode colors in the table, but weights to texture layers. As a single color can only store 4 channels, i might end up using 2 lookup tables like this, which will give me up to 8 texture layers. Similar to texture splatting.. but on a per-pixel level :)
At the moment, the texture shown above is procedurally generated at more than 60 fps on a PIV 1 Ghz + Radeon 9700. I'm not worried about the performance though, as these textures only need to be generated once when the terrain patch is loaded. After that, everything is cached.
For the full planet, i think i will not have to generate textures more than a few times per second.