• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
4struct Inputs {
5};
6struct Outputs {
7    half4 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    float x = 0.0;
13    switch (0) {
14        case 0:
15            x = 0.0;
16            if (x < 1.0) {
17                _out.sk_FragColor = half4(half(x));
18                break;
19            }
20        case 1:
21            x = 1.0;
22    }
23    return _out;
24}
25