2021-01-26 21:28:12 +00:00
|
|
|
uniform half4 colorWhite;
|
|
|
|
|
2021-04-21 18:27:08 +00:00
|
|
|
half4 main(float2 coords) {
|
2021-01-26 21:28:12 +00:00
|
|
|
half4 x = colorWhite;
|
2021-01-26 16:06:42 +00:00
|
|
|
|
|
|
|
// Verify that break is allowed in a for loop.
|
|
|
|
for (half r = -5; r < 5; r += 1) {
|
2021-01-27 14:56:04 +00:00
|
|
|
x.r = saturate(r);
|
2021-01-26 16:06:42 +00:00
|
|
|
if (x.r == 0) break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Verify that continue is allowed in a for loop.
|
|
|
|
for (half b = 5; b >= 0; b -= 1) {
|
|
|
|
x.b = b;
|
|
|
|
if (x.a == 1) continue; // should always happen
|
|
|
|
x.g = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// x contains green.
|
|
|
|
return x;
|
|
|
|
}
|