summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/spirv-cross/reference/shaders-msl/flatten/multiindex.flatten.vert
blob: f4549abab26824b34160e1fbcc0a723c024e35ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

struct UBO
{
    float4 Data[3][5];
};

struct main0_out
{
    float4 gl_Position [[position]];
};

struct main0_in
{
    int2 aIndex [[attribute(0)]];
};

vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _20 [[buffer(0)]])
{
    main0_out out = {};
    out.gl_Position = _20.Data[in.aIndex.x][in.aIndex.y];
    return out;
}