기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


Pass block in ShaderLab reference

Reference for the Pass block in ShaderLab.
읽는 시간 1분최근 업데이트: 한 달 전

중요
The Built-In Render Pipeline is deprecated and will be made obsolete in a future release.
It remains supported, including bug fixes and maintenance, through the full Unity 6.7 LTS lifecycle.
To define a Pass in ShaderLab, use a
Pass
block. This page contains information on using
Pass
blocks. For information on how a Shader object works, and the relationship between Shader objects, SubShaders and Passes, see Shader object fundamentals.
Inside the
Pass
block, you can:

Render pipeline compatibility

Feature name

Universal Render Pipeline (URP)

High Definition Render Pipeline (HDRP)

Custom SRP

Built-in Render Pipeline

ShaderLab: Pass blockYesYesYesYes

Syntax

Signature

Function

Pass

{

    
<optional: name>

 
<optional: tags>

    
<optional: commands>

   
<optional: shader code>

}
Defines a Pass.

Additional resources