inline bool shouldLoop(half4 v) { return v.x < 0.5; } void main() { sk_FragColor = half4(0); do { sk_FragColor += half4(0.125); } while (shouldLoop(sk_FragColor)); }