SPIRV-Cross/shaders/flatten/push-constant.flatten.vert

18 lines
433 B
GLSL
Raw Normal View History

#version 310 es
layout(push_constant, std430) uniform PushMe
{
mat4 MVP;
mat2 Rot; // The MatrixStride will be 8 here.
2017-01-21 11:39:16 +00:00
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;
2017-01-21 11:39:16 +00:00
vRot = registers.Rot * Rot + registers.Arr[2]; // Constant access should work even if array stride is just 4 here.
}