• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
4struct Inputs {
5};
6struct Outputs {
7    float4 sk_FragColor [[color(0)]];
8};
9fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
10    Outputs _out;
11    (void)_out;
12    {
13        _out.sk_FragColor = float4(1.0);
14    }
15    {
16        _out.sk_FragColor = float4(2.0);
17    }
18    {
19        _out.sk_FragColor = float4(6.0);
20    }
21    _out.sk_FragColor = float4(7.0);
22    _out.sk_FragColor = float4(-8.0);
23    _out.sk_FragColor = float4(-9.0);
24    _out.sk_FragColor = float4(10.0);
25    {
26        _out.sk_FragColor = float4(11.0);
27    }
28    {
29        _out.sk_FragColor = float4(13.0);
30    }
31    {
32        _out.sk_FragColor = float4(15.0);
33    }
34    {
35        _out.sk_FragColor = float4(16.0);
36    }
37    {
38        _out.sk_FragColor = float4(18.0);
39    }
40    _out.sk_FragColor = float4(19.0);
41    _out.sk_FragColor = float4(20.0);
42    {
43        _out.sk_FragColor = float4(21.0);
44    }
45    int f = 1;
46    if (f == 1) {
47        _out.sk_FragColor = float4(1.0);
48    }
49    if (f != 1) {
50        _out.sk_FragColor = float4(4.0);
51    }
52    _out.sk_FragColor = f == 0 ? float4(7.0) : float4(-7.0);
53    _out.sk_FragColor = f != 0 ? float4(8.0) : float4(-8.0);
54    _out.sk_FragColor = f == 1 ? float4(9.0) : float4(-9.0);
55    _out.sk_FragColor = f != 1 ? float4(10.0) : float4(-10.0);
56    switch (f) {
57        case 0:
58            _out.sk_FragColor = float4(11.0);
59            break;
60        case 1:
61            _out.sk_FragColor = float4(12.0);
62            break;
63    }
64    return _out;
65}
66