Lets say I have this GLSL code:
#version 330
out vec4 outputColor;
void main()
{
float lerpValue = gl_FragCoord.y / 500.0f;
outputColor = mix(vec4(1.0f, 1.0f, 1.0f, 1.0f),
vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpValue);
}
(taken from http://www.arcsynthesis.org/gltut/Basics/Tutorial%2002.html)
How does OpenGL determine that outputColor is in fact what color the fragment should be?