#version 450 core struct PosTexRot {vec4 posXX; vec4 texPosRot; }; layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ; layout (std430, binding = 8) readonly buffer Data { PosTexRot data[]; }; out vec4 vTexPosRot; out vec2 vPos; void main() { vPos = data[gl_VertexID].posXX.xy; gl_Position = theMat * vec4(vPos,0,1.0) ; vTexPosRot = data[gl_VertexID].texPosRot; }