Our Triangle Fragment Shader
We’ve been
shading
our triangle in a yellow color
shading
is the fancy term for processing something
in this case, it’s color
For fragment shaders, we need to define our own output variable
there’s no
gl_Position
equivalent
below, we define
fColor
as our output variable
we use the
f
prefix to indicate that it’s a fragment-shader output
totally arbitrary choice
out vec4 fColor; void main() { fColor = vec4(1.0, 1.0, 0.0, 1.0); }