• 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    float4 x = float4(1.0, 1.0, 1.0, 1.0);
13    do {
14        x.x = x.x - 0.25;
15        if (x.x <= 0.0) break;
16    } while (x.w == 1.0);
17    do {
18        x.z = x.z - 0.25;
19        if (x.w == 1.0) continue;
20        x.y = 0.0;
21    } while (x.z > 0.0);
22    _out.sk_FragColor = x;
23    return _out;
24}
25