blob: b87bdf8292007435521464fbaf5753643526519f [file] [log] [blame]
John Stilesaeae3a52020-09-25 13:35:58 -04001#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]]) {
John Stilesf7410bd2021-01-19 13:07:55 -050010 Outputs _out;
John Stiles37279172021-01-21 22:24:28 -050011 (void)_out;
John Stilesaeae3a52020-09-25 13:35:58 -040012 float x;
13 switch (int(sqrt(1.0))) {
14 case 0:
15 x = 0.0;
16 break;
17 case 1:
18 x = 1.0;
19 break;
20 default:
21 x = 2.0;
22 }
John Stilesf7410bd2021-01-19 13:07:55 -050023 _out.sk_FragColor = float4(x);
24 return _out;
John Stilesaeae3a52020-09-25 13:35:58 -040025}