1 2 3 4 5 6 7 8 9 10 11 12
#extension GL_ARB_explicit_attrib_location: require layout(location = 0) in vec4 vertex; layout(location = 1) in vec3 color; vec3 function(void); void main() { gl_Position = vertex; gl_FrontColor = vec4(color + function(), 1.0); }