Pass block in ShaderLab reference
Reference for the Pass block in ShaderLab.
읽는 시간 1분최근 업데이트: 한 달 전
To define a Pass in ShaderLab, use a block. This page contains information on using blocks. For information on how a Shader object works, and the relationship between Shader objects, SubShaders and Passes, see Shader object fundamentals.
PassPassInside the block, you can:
Pass- Assign a name to the Pass, using a Name block. See ShaderLab: assigning a name to a Pass.
- Assign key-value pairs of data to the Pass, using a Tags block. See ShaderLab: assigning tags to a Pass.
- Perform operations using ShaderLab commands. See ShaderLab: using commands.
- Add shader code to the Pass, using a shader code block. See ShaderLab: shader code blocks.
- Specify package requirements using the block. This makes Unity only run the Pass if the required packages are installed. See ShaderLab: specifying package requirements.
PackageRequirements
Render pipeline compatibility
Feature name | Universal Render Pipeline (URP) | High Definition Render Pipeline (HDRP) | Custom SRP | Built-in Render Pipeline |
|---|---|---|---|---|
| ShaderLab: Pass block | Yes | Yes | Yes | Yes |
Syntax
Signature | Function |
|---|---|
| Defines a Pass. |