To define a Pass in ShaderLabUnity’s language for defining the structure of Shader objects. More info
See in Glossary, use a Pass
block. This page contains information on using Pass
blocks. For information on how a ShaderA program that runs on the GPU. More info
See in Glossary object works, and the relationship between Shader objectsAn instance of the Shader class, a Shader object is container for shader programs and GPU instructions, and information that tells Unity how to use them. Use them with materials to determine the appearance of your scene. More info
See in Glossary, SubShaders and Passes, see Shader object fundamentals.
Inside the Pass
block, you can:
PackageRequirements
block. This makes Unity only run the Pass if the required packages are installed. See ShaderLab: specifying package requirements.Feature name | Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info See in Glossary (URP) |
High Definition Render Pipeline (HDRP) | Custom SRP | Built-in Render Pipeline |
---|---|---|---|---|
ShaderLab: Pass block | Yes | Yes | Yes | Yes |
Signature | Function |
---|---|
Pass { <optional: name> <optional: tags> <optional: commands> <optional: shader code> }
|
Defines a Pass. |