| uniform half4 color; | |
| inline bool testA(half4 v) { | |
| return v.x <= 0.5; | |
| } | |
| inline bool testB(half4 v) { | |
| return v.x > 0.5; | |
| } | |
| void main() { | |
| sk_FragColor = half4(0); | |
| if (testA(color) && testB(color)) { | |
| sk_FragColor = half4(0.5); | |
| } | |
| if (testB(color) || testA(color)) { | |
| sk_FragColor = half4(1.0); | |
| } | |
| } |