• 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};
9struct Globals {
10    half attr1;
11    int attr2;
12    float attr3;
13    half4 attr4;
14};
15fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
16    Globals _globals{{}, 123, {}, half4(4.0h, 5.0h, 6.0h, 7.0h)};
17    (void)_globals;
18    Outputs _out;
19    (void)_out;
20    _out.sk_FragColor = half4(_globals.attr1, half(_globals.attr2), half(_globals.attr3), _globals.attr4.x);
21    return _out;
22}
23