Quote:

if(inDiffuse.x < 0.15) outColor = float4(color2.b, color2.b, color2.b, 1.0);
else if(inDiffuse.x < 0.3) outColor = float4(color2.g, color2.g, color2.g, 1.0);
else if(inDiffuse.x < 0.45) outColor = float4(color2.r, color2.r, color2.r, 1.0);
else if(inDiffuse.x < 0.6) outColor = float4(color1.b, color1.b, color1.b, 1.0);
else if(inDiffuse.x < 0.75) outColor = float4(color1.g, color1.g, color1.g, 1.0);
else outColor = float4(color1.r, color1.r, color1.r, 1.0);


with if it works nicely, even with shader model 1.1.
what does this get translated into?
does this have any disadvantages?

edit: weird! how can so many ifs work with 1.1 (which just supported 8 assembler instructions if i remember correctly)? could it be that ps_1_1 gets ignored and the shader model of the gpu always gets used? which would be really stupid since my card supports 4.0 and i have to develop for 1.1. is there some way to force 1.1?

Quote:
The problem there is interpolation, but I doubt that you will stay wthin the limits otherwize.
the hard borders don't look as well as i had imagined. so interpolation probably would be better anyway.