Internally, shader compilation has multiple stages. The first stage is preprocessing, where a program called the preprocessor prepares the code for compilation. Preprocessor directives are instructions for the preprocessor.
This section of the manual contains information on Unity-specific ways of working with HLSL preprocessor directives, and HLSL preprocessor directives that are unique to Unity. It does not contain exhaustive documentation on all the preprocessor directives that HLSL supports, or general information on working with preprocessor directives in HLSL. For that information, see the HLSL documentation: Preprocessor directives (HLSL).
|include and include_with_pragmas directives in HLSL||Working with
|pragma directives in HLSL||Working with
|Targeting shader models and GPU features in HLSL||Using
See in Glossary requires certain GPU features.
|Targeting graphics APIs and platforms in HLSL||Using
|Declaring and using shader keywords in HLSL||Using