Portal:OpenGL Shading Language/Type Qualifiers

From OpenGL Wiki
Jump to navigation Jump to search

Shader stages have a large number of interfaces. They have a means of receiving input from prior pipeline stages, sending output to later stages, retrieving uniform data provided by the application, and so forth. These interfaces, and the behavior of data accessed through them, are defined by global variables declared with special Type Qualifiers.

There are a wide range of special qualifiers. Among the most important qualifiers are the input qualifiers, which designates input values from earlier stages; output qualifiers, which designate output values to the next stage, and uniform qualifiers, which designates parameters set from OpenGL. Certain GLSL types can only be used with certain qualifiers. For example, all opaque types must be declared as uniforms, when declared as globals.