To reduce the number of shaderA program that runs on the GPU. More info
See in Glossary variants in the 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), you can make Unity use dynamic branching in the shader code that generates fog, instead of keywords and shader variants.
Enabling this setting removes shader variants for the following keywords:
FOG_LINEAR
FOG_EXP
FOG_EXP2
Enabling this setting speeds up build time but reduces graphics performance, so you should disable the setting when you build your final project.
Refer to Configure settings with the URP Config package for information on how to update the setting. Update the following settings:
ShaderConfig.cs.hlsl
file, in the line public const int k_UseDynamicBranchFogKeyword = 0
, change 0
to 1
.ShaderConfig.cs.hlsl
file, above the #endif
statement, add #define USE_DYNAMIC_BRANCH_FOG_KEYWORD (1)
.