Fixed-Function Fragment Shaders
Fragment Shader Overview
(1)Built-In Special Variables
gl_FragCoord
gl_FrontFacing
gl_PointCoord
gl_FragDepth
(2)Built-In Constants
gl_MaxFragmentInputVectors
gl_MaxTextureImageUnits
gl_MaxFragmentUniformVectors
gl_MaxDrawBuffers
gl_MinProgramTexelOffset
gl_MaxProgramTexelOffset
(3)Precision Qualifiers
We remind you here that there is no default precision for fragment shaders. As a consequence, every fragment shader must declare a default precision .
Implementing Fixed-Function Techniques
(1)Multitexturing
(2)Fog
(3)Alpha Test (Using Discard)
(4)User Clip Planes