1uniform half4 colorRed, colorGreen; 2 3bool test() { 4 bool a = 1 == 1 || 2 == 8; 5 bool b = 1 > 1 || 2 == 8; 6 bool c = 1 == 1 && 2 <= 8; 7 bool d = 1 == 2 && 2 == 8; 8 bool e = 1 == 1 ^^ 1 != 1; 9 bool f = 1 == 1 ^^ 1 == 1; 10 bool g = true == true; 11 bool h = false == true; 12 bool i = true == !false; 13 bool j = false == !false; 14 15 const bool TRUE = true; 16 const bool FALSE = false; 17 bool k = all(bool4(1 == 1, !false, 123 > 12, TRUE)); // all are true 18 bool l = all(bool3(TRUE, 1 == 2, true)); // three out of four are true 19 bool m = any(bool4(true, 1 == 2, true, TRUE)); // three out of four are true 20 bool n = any(bool2(0 == 1, FALSE)); // none are true 21 bool o = any(not(bool2(0 == 1, FALSE))); // all true 22 bool p = all(not(bool4(1 == 1, !false, 123 > 12, TRUE))); // none are true 23 24 return a && !b && c && !d && e && !f && g && !h && i && !j && k && !l && m && !n && o && !p; 25} 26 27half4 main(float2 coords) { 28 return test() ? colorGreen : colorRed; 29} 30 31