Valid values for this tag depend on the render pipeline. In the Scriptable Render Pipeline, you can use the SRPDefaultUnlit value to reference Passes without a LightMode tag. In the Built-in Render Pipeline, if you do not set a LightMode tag, Unity renders the Pass without any lighting or shadows this essentially the same as having a LightMode value of Always. For more information, see Syntax and valid values. Note: The LightMode tag is not related to the LightMode enum, which relates to lighting.Įvery render pipeline uses the LightMode tag, but the predefined values and their meanings vary. The LightMode tag is a predefined Pass tag that Unity uses to determine whether to execute the Pass during a given frame, when during the frame Unity executes the Pass, and what Unity does with the output. For more information, see Using the LightMode tag with C# scripts. Note: There are several APIs that work directly with the LightMode Pass tag. This works for Unity’s predefined Pass tags, and for custom Pass tags that you have created. More info See in Glossary, you can use the Shader.FindPassTagValue API. To access the value of a Pass tag from C# scripts A piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. To define SubShader tags, place the Tags block inside a SubShader block but outside a Pass block.įor information on assigning tags to a SubShader, see Assigning tags to a SubShader.To define Pass tags, place the Tags block inside a Pass block. The difference is where you put the Tags block: Assigning SubShader tags to a Pass has no effect, and vice versa. Note that both SubShaders and Passes use the Tags block, but they work differently. To assign Tags to a Pass in ShaderLab, you place a Tags block inside a Pass block. Render pipeline compatibility Feature name
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |