A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/sprite/../add-shader-tag.html below:

Manual: Add a shader tag to a SubShader or Pass

Introduction to shader tags

Set a shader to require URP or HDRP

Add a shader tag to a SubShader or Pass

In ShaderLabUnity’s language for defining the structure of Shader objects. More info
See in Glossary
, you assign tags to a SubShader or Pass by placing a Tags block inside the block.

Note that both SubShaders and Passes use the Tags block, but they work differently. Assigning SubShader tags to a Pass has no effect, and vice versa. The difference is where you put the Tags block:

Example in a Pass block
Shader "Examples/ExampleRequireOptions"
{
    SubShader
    {
        Pass
        {    
              Tags { "RequireOptions" = "SoftVegetation" }
            
              // The rest of the code that defines the Pass goes here.
        }
    }
}
Additional resources

Introduction to shader tags

Set a shader to require URP or HDRP


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4