1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#version 450 layout (location = 0) in vec2 position; layout (location = 1) in vec3 color; out gl_PerVertex { vec4 gl_Position; }; layout (location = 1) out vec3 frag_color; void main() { gl_Position = vec4(position, 0.5, 1.0); frag_color = color; }