2020-09-14 21:30:13 +00:00
|
|
|
|
2021-01-27 00:58:22 +00:00
|
|
|
out vec4 sk_FragColor;
|
2021-01-26 21:28:12 +00:00
|
|
|
uniform vec4 colorRed;
|
|
|
|
uniform vec4 colorGreen;
|
2021-03-15 18:30:06 +00:00
|
|
|
bool test() {
|
|
|
|
bool ok = true;
|
|
|
|
float x = 34.0;
|
|
|
|
ok = ok && x == 34.0;
|
|
|
|
x = 30.0;
|
|
|
|
ok = ok && x == 30.0;
|
|
|
|
x = 64.0;
|
|
|
|
ok = ok && x == 64.0;
|
|
|
|
x = 16.0;
|
|
|
|
ok = ok && x == 16.0;
|
|
|
|
x = 19.0;
|
|
|
|
ok = ok && x == 19.0;
|
|
|
|
x = 1.0;
|
|
|
|
ok = ok && x == 1.0;
|
|
|
|
x = -2.0;
|
|
|
|
ok = ok && x == -2.0;
|
|
|
|
x = 3.0;
|
|
|
|
ok = ok && x == 3.0;
|
|
|
|
x = -4.0;
|
|
|
|
ok = ok && x == -4.0;
|
|
|
|
x = 5.0;
|
|
|
|
ok = ok && x == 5.0;
|
|
|
|
x = -6.0;
|
|
|
|
ok = ok && x == -6.0;
|
|
|
|
x = 7.0;
|
|
|
|
ok = ok && x == 7.0;
|
|
|
|
x = -8.0;
|
|
|
|
ok = ok && x == -8.0;
|
|
|
|
x = 9.0;
|
|
|
|
ok = ok && x == 9.0;
|
|
|
|
x = -10.0;
|
|
|
|
ok = ok && x == -10.0;
|
|
|
|
x = 11.0;
|
|
|
|
ok = ok && x == 11.0;
|
|
|
|
x = -12.0;
|
|
|
|
ok = ok && x == -12.0;
|
|
|
|
float unknown = sqrt(4.0);
|
|
|
|
x = unknown;
|
|
|
|
ok = ok && x == unknown;
|
|
|
|
x = unknown;
|
|
|
|
ok = ok && x == unknown;
|
|
|
|
x = unknown;
|
|
|
|
ok = ok && x == unknown;
|
|
|
|
x = 0.0;
|
|
|
|
ok = ok && x == 0.0;
|
|
|
|
x = unknown;
|
|
|
|
ok = ok && x == unknown;
|
|
|
|
x = unknown;
|
|
|
|
ok = ok && x == unknown;
|
|
|
|
x = 0.0;
|
|
|
|
ok = ok && x == 0.0;
|
|
|
|
x = unknown;
|
|
|
|
ok = ok && x == unknown;
|
|
|
|
x = 0.0;
|
|
|
|
ok = ok && x == 0.0;
|
|
|
|
x += 1.0;
|
|
|
|
ok = ok && x == 1.0;
|
|
|
|
ok = ok && x == 1.0;
|
|
|
|
x -= 2.0;
|
|
|
|
ok = ok && x == -1.0;
|
|
|
|
ok = ok && x == -1.0;
|
|
|
|
ok = ok && x == -1.0;
|
|
|
|
x *= 2.0;
|
|
|
|
ok = ok && x == -2.0;
|
|
|
|
ok = ok && x == -2.0;
|
|
|
|
x /= 2.0;
|
|
|
|
ok = ok && x == -1.0;
|
|
|
|
return ok;
|
|
|
|
}
|
2021-01-22 14:51:13 +00:00
|
|
|
vec4 main() {
|
2021-03-15 18:30:06 +00:00
|
|
|
return test() ? colorGreen : colorRed;
|
2020-09-14 21:30:13 +00:00
|
|
|
}
|