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