2017-01-21 11:29:20 +00:00
|
|
|
#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];
|
2017-01-21 11:29:20 +00:00
|
|
|
} 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.
|
2017-01-21 11:29:20 +00:00
|
|
|
}
|