Multiple texture blending?

Is there a shader that can handle mulitple textures with a blending attribute that can be changed via script? I know there is a skybox one, but I need something for objects, not the skybox. Also, is it possible to have more than two textures to be blended?

What do you want to base the blending on? Like, R * T1 + G * T2 + B * T3 + A * T4, where the Ts are textures and RGBA adds up to one?

Or this?
http://www.unifycommunity.com/wiki/index.php?title=TerrainFourLayer2Pass
alternate:

Or this?