layout (location = 1) out int id; void main() { id = gl_InstanceID; }