Version: Unity 6.1 Alpha (6000.1)
Language : English
Pass in ShaderLab reference
Name directive in ShaderLab reference

Pass block in ShaderLab reference

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:

Render pipeline compatibility

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

Syntax

Signature Function
Pass
{
    <optional: name>
 <optional: tags>
    <optional: commands>
   <optional: shader code>
}
Defines a Pass.

Additional resources

Pass in ShaderLab reference
Name directive in ShaderLab reference