1uniform half4 colorGreen, colorRed; 2 3half4 main(float2 coords) { 4 bool ok = true; 5 bool TRUE = bool(colorGreen.g); 6 7 ok = ok && (1 == (TRUE ? 1 : 0)); 8 ok = ok && (1.0 == (TRUE ? 1.0 : 0.0)); 9 10 ok = ok && (bool(TRUE ? 1 : 0)); 11 ok = ok && (1 == int(TRUE ? 1 : 0)); 12 ok = ok && (1.0 == float(TRUE ? 1.0 : 0.0)); 13 14 ok = ok && (bool2(true) == bool2(TRUE ? 1 : 0)); 15 ok = ok && (int2(1) == int2(TRUE ? 1 : 0)); 16 ok = ok && (float2(1.0) == float2(TRUE ? 1.0 : 0.0)); 17 18 return ok ? colorGreen : colorRed; 19} 20