March 2013
Intermediate to advanced
984 pages
26h 18m
English
The first step in compilation of a GLSL shader is parsing by the preprocessor. Similar to the “C” preprocessor, there are a number of directives for creating conditional compilation blocks and defining values. However, unlike the “C” preprocessor, there is no file inclusion (#include).
Table 2.9 lists the preprocessor directives accepted by the GLSL preprocessor and their functions.
Table 2.9. GLSL Preprocessor Directives
The GLSL preprocessor allows macro definition in much the same manner as the “C” preprocessor, with the exception of the string substitution and concatenation facilities. ...