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