Version: Unity 6.3 Beta (6000.3)
Language : English
Strip feature shader variants in URP
Strip level of detail (LOD) shader variants in URP

Enable dynamic branching in prebuilt shaders

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), enable Unity using dynamic branching in prebuilt shaders instead of keywords and shader variants.

Note: If you target an older mobile device, dynamic branching can cause performance issues. Test on your target device.

Follow these steps:

  1. From the main menu, go to Edit > Project Settings > Graphics.
  2. In the Shader Build Settings section, select the Add (+) button.
  3. Add the keyword set to change from static branching to dynamic branching, from the table below.
  4. Set Type Override to dynamic_branch.
Keyword set Feature dynamic branching is enabled for
FOG_LINEAR FOG_EXP FOG_EXP2 Fog
_REFLECTION_PROBE_BLENDING Reflection ProbeA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary
blending. For more information about Reflection Probes, refer to Reflection Probes in URP.
_REFLECTION_PROBE_BOX_PROJECTION Reflection Probe box projection. For more information about box projection, refer to Troubleshooting reflections.

Additional resources

Strip feature shader variants in URP
Strip level of detail (LOD) shader variants in URP