• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3#ifdef __clang__
4#pragma clang diagnostic ignored "-Wall"
5#endif
6using namespace metal;
7struct S {
8    array<half, 3> rgb;
9    half a;
10};
11struct Inputs {
12};
13struct Outputs {
14    half4 sk_FragColor [[color(0)]];
15};
16fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
17    Outputs _out;
18    (void)_out;
19    S s;
20    s.rgb[0] = 0.0h;
21    s.rgb[1] = 1.0h;
22    s.rgb[2] = 0.0h;
23    s.a = 1.0h;
24    _out.sk_FragColor = half4(s.rgb[0], s.rgb[1], s.rgb[2], s.a);
25    return _out;
26}
27