The OpenGL Shading Language has a small number of built-in variables, a set of constants, and a large collection of built-in functions. This appendix describes each of these, in the following major sections:
• “Built-in Variables” lists the variables, first showing the declarations for all stages, followed by a description of each stage.
• “Built-in Constants” lists all the built-in constants.
• “Built-in Functions” describes all GLSL built-in functions. You’ll need to refer to the table at the beginning of the section to decode the types.
Each programmable stage has a different set of built-in variables, though there is some overlap. We show all the built-in variable declarations ...