You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
466 B

uniform half4 colorWhite;
half4 main(float2 coords) {
half4 x = colorWhite;
// Verify that break is allowed in a for loop.
for (half r = -5; r < 5; r += 1) {
x.r = saturate(r);
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;
}