1half4 main(float2 coords) { 2 half4 x = half4(1, 1, 1, 1); 3 4 // Verify that break is allowed in a do-while loop. 5 do { 6 x.r -= 0.25; 7 if (x.r <= 0) break; 8 } while (x.a == 1); 9 10 // Verify that continue is allowed in a do-while loop. 11 do { 12 x.b -= 0.25; 13 if (x.a == 1) continue; // should always happen 14 x.g = 0; 15 } while (x.b > 0); 16 17 // x contains green. 18 return x; 19} 20