• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3
4using namespace metal;
5
6struct Input
7{
8    float2 v0;
9    float2 v1;
10    float3 v2;
11    float4 v3;
12    float v4;
13    float v5;
14    float v6;
15};
16
17struct main0_out
18{
19    float4 FragColor [[color(0)]];
20};
21
22struct main0_in
23{
24    float2 Input_v0 [[user(locn0), centroid_no_perspective]];
25    float2 Input_v1 [[user(locn1), centroid_no_perspective]];
26    float3 Input_v2 [[user(locn2), centroid_no_perspective]];
27    float4 Input_v3 [[user(locn3), centroid_no_perspective]];
28    float Input_v4 [[user(locn4), centroid_no_perspective]];
29    float Input_v5 [[user(locn5), centroid_no_perspective]];
30    float Input_v6 [[user(locn6), centroid_no_perspective]];
31};
32
33fragment main0_out main0(main0_in in [[stage_in]])
34{
35    main0_out out = {};
36    Input inp = {};
37    inp.v0 = in.Input_v0;
38    inp.v1 = in.Input_v1;
39    inp.v2 = in.Input_v2;
40    inp.v3 = in.Input_v3;
41    inp.v4 = in.Input_v4;
42    inp.v5 = in.Input_v5;
43    inp.v6 = in.Input_v6;
44    out.FragColor = float4(inp.v0.x + inp.v1.y, inp.v2.xy, ((inp.v3.w * inp.v4) + inp.v5) - inp.v6);
45    return out;
46}
47
48