March 2013
Intermediate to advanced
984 pages
26h 18m
English
The #pragma directive provides the compiler additional information regarding how you would like your shaders compiled.
The optimize option instructs the compiler to enable or disable optimization of the shader from the point where the directive resides forward in the shader source. You can enable or disable optimization by issuing either
#pragma optimize(on)
or
#pragma optimize(off)
respectively. These options may only be issued outside of a function definition. By default, optimization is enabled for all shaders.
The debug option enables or disables additional diagnostic output of the shader. You can enable or disable debugging by issuing either
#pragma debug(on)
or
#pragma ...