Ifs are just as not so good And good as the else errrr by that i mean.
Basically the gpu will simultaneously execute the if and the else.
Then figure it all out at the end, you can imagine how that could bottleneck.
Ifs are bad for shader code because it sort of breaks the parallel processing they do.
You can get away with a couple but too many and your pushing it.
It's not easy to design functions that act to evaluate the if else thru straight math or always possible, but sometimes it is possible. To say in the view of polynominals or rounding.
This is sort of the idea with multi-texturing or texture splattering but used in the context of a switch.
For example say you Round( a*b ) were a and b are values from 0 to 1 the result can only be one if a and b are 1 other wise rounding down it will be 0. In this context you get a value that is 1 or 0 which symbolizes true or false.
if you were to add pixel colors from texture A by multiplying the colors against result and texture B by the result minus 1 you would get pixels from texture a or b but never both. This is useful sometimes like in the case of multi-texturing but most often its not going to help.