If I recall correctly, anything below Shader Model 3.0 (and sometimes Shader Model 3.0 if it gets "optimised" that way) will calculate the results of both sides of a branch and then use the results of the comparison to choose which results to keep. So, it works, and it doesn't really make things worse, but keep in mind performance-wise that you're not skipping branches. As such, it'd probably be best to change your if/else to get the four colours once and do some interpolation from there.

For example, in the code you (Carlos) posted above, you're probably sampling each texture twice.


Formerly known as JulzMighty.
I made KarBOOM!