1 #include <metal_stdlib>
11 half4 sk_FragColor [[color(0)]];
13 half4 unpremul_h4h4(half4 color) {
14 return half4(color.xyz / max(color.w, 9.9999997473787516e-05h), color.w);
16 half4 live_fn_h4h4h4(half4 a, half4 b) {
19 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
25 a = live_fn_h4h4h4(half4(3.0h), half4(-5.0h));
28 b = unpremul_h4h4(half4(1.0h));
30 _out.sk_FragColor = any(a != half4(0.0h)) && any(b != half4(0.0h)) ? _uniforms.colorGreen : _uniforms.colorRed;