2021-01-26 21:28:12 +00:00
|
|
|
uniform half4 colorRed, colorGreen;
|
|
|
|
|
2021-01-20 00:00:31 +00:00
|
|
|
bool test() {
|
|
|
|
bool a = 1 == 1 || 2 == 8;
|
|
|
|
bool b = 1 > 1 || 2 == 8;
|
|
|
|
bool c = 1 == 1 && 2 <= 8;
|
|
|
|
bool d = 1 == 2 && 2 == 8;
|
|
|
|
bool e = 1 == 1 ^^ 1 != 1;
|
|
|
|
bool f = 1 == 1 ^^ 1 == 1;
|
|
|
|
bool g = true == true;
|
|
|
|
bool h = false == true;
|
|
|
|
bool i = true == !false;
|
|
|
|
bool j = false == !false;
|
2021-05-07 03:55:19 +00:00
|
|
|
|
|
|
|
const bool TRUE = true;
|
|
|
|
const bool FALSE = false;
|
2021-05-11 01:56:10 +00:00
|
|
|
bool k = all(bool4(1 == 1, !false, 123 > 12, TRUE)); // all are true
|
|
|
|
bool l = all(bool3(TRUE, 1 == 2, true)); // three out of four are true
|
|
|
|
bool m = any(bool4(true, 1 == 2, true, TRUE)); // three out of four are true
|
|
|
|
bool n = any(bool2(0 == 1, FALSE)); // none are true
|
|
|
|
bool o = any(not(bool2(0 == 1, FALSE))); // all true
|
|
|
|
bool p = all(not(bool4(1 == 1, !false, 123 > 12, TRUE))); // none are true
|
2021-01-20 00:00:31 +00:00
|
|
|
|
2021-05-11 01:56:10 +00:00
|
|
|
return a && !b && c && !d && e && !f && g && !h && i && !j && k && !l && m && !n && o && !p;
|
2021-01-20 00:00:31 +00:00
|
|
|
}
|
|
|
|
|
2021-04-21 18:27:08 +00:00
|
|
|
half4 main(float2 coords) {
|
2021-01-26 21:28:12 +00:00
|
|
|
return test() ? colorGreen : colorRed;
|
2020-09-14 21:30:13 +00:00
|
|
|
}
|
2021-01-22 14:51:13 +00:00
|
|
|
|