• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3
4using namespace metal;
5
6struct UBO
7{
8    float4x4 uMVPR;
9    float4x4 uMVPC;
10    float4x4 uMVP;
11};
12
13struct main0_out
14{
15    float4 gl_Position [[position]];
16};
17
18struct main0_in
19{
20    float4 aVertex [[attribute(0)]];
21};
22
23vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _18 [[buffer(0)]])
24{
25    main0_out out = {};
26    float2 v = float4x2(_18.uMVP[0].xy, _18.uMVP[1].xy, _18.uMVP[2].xy, _18.uMVP[3].xy) * in.aVertex;
27    out.gl_Position = (_18.uMVPR * in.aVertex) + (in.aVertex * _18.uMVPC);
28    return out;
29}
30
31