123456789101112#version 460 core layout(location = 0) in vec2 position; layout(location = 0) out uint buffer_idx; void main() { buffer_idx = gl_VertexIndex / 4; gl_Position = vec4(position, 0, 1);}