RetroArch/deps/SPIRV-Cross/shaders-msl/flatten/push-constant.flatten.vert
aliaspider 5af5222249 update SPIRV-Cross
- https://github.com/KhronosGroup/SPIRV-Cross/commit/
66a407285e36a0f772e3209cb86ded6e3d900f6a
2018-01-26 13:48:17 +01:00

18 lines
433 B
GLSL

#version 310 es
layout(push_constant, std430) uniform PushMe
{
mat4 MVP;
mat2 Rot; // The MatrixStride will be 8 here.
float Arr[4];
} registers;
layout(location = 0) in vec2 Rot;
layout(location = 1) in vec4 Pos;
layout(location = 0) out vec2 vRot;
void main()
{
gl_Position = registers.MVP * Pos;
vRot = registers.Rot * Rot + registers.Arr[2]; // Constant access should work even if array stride is just 4 here.
}