Geometry Shader Inputs
The input to the geometry shader is fed by the output of the vertex shader, or if tessellation is active, the output of the tessellation evaluation shader.3 As the geometry shader runs once per input primitive, outputs from the previous stage (vertex shader or tessellation evaluation shader) become arrays in the geometry shader. This includes all user-defined inputs and the special built-in input variable,
gl_in, which is array containing the built-in outputs that are available in the previous stage. The
gl_in input is implicitly declared as an interface block. The definition of
gl_in is shown in Example 10.3.