| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct Buffer |
| 7 |
{ |
| 8 |
float4x4 MVPRowMajor; |
| 9 |
float4x4 MVPColMajor; |
| 10 |
float4x4 M; |
| 11 |
}; |
| 12 |
|
| 13 |
struct main0_out |
| 14 |
{ |
| 15 |
float4 gl_Position [[position]]; |
| 16 |
}; |
| 17 |
|
| 18 |
struct main0_in |
| 19 |
{ |
| 20 |
float4 Position [[attribute(0)]]; |
| 21 |
}; |
| 22 |
|
| 23 |
vertex main0_out main0(main0_in in [[stage_in]], constant Buffer& _13 [[buffer(0)]]) |
| 24 |
{ |
| 25 |
main0_out out = {}; |
| 26 |
float4 c0 = _13.M * (in.Position * _13.MVPRowMajor); |
| 27 |
float4 c1 = _13.M * (_13.MVPColMajor * in.Position); |
| 28 |
float4 c2 = _13.M * (_13.MVPRowMajor * in.Position); |
| 29 |
float4 c3 = _13.M * (in.Position * _13.MVPColMajor); |
| 30 |
out.gl_Position = ((c0 + c1) + c2) + c3; |
| 31 |
return out; |
| 32 |
} |
| 33 |
|