Version: Unity 6.5 (6000.5)
Language : English
Enable dynamic branching in shaders in URP
Shader Material Inspector window reference for URP

Settings and keywords reference for stripping keywords in URP

Explore the settings and shader keywords you can use to speed up build time in the Universal Render Pipeline (URP) by stripping shader variants. For more information, refer to Strip shader variants.

Important: When you remove built-in shader keywords, Unity might strip shader variants your built project needs. To check how many shader variants your project has, enable strict shader variant matching, otherwise Unity might replace missing shader variants with others. For more information, refer to Check how many shader variants you have.

Decals

Feature Location in the Editor Keyword set for Shader Build Settings
Decals that use DBuffer mode Universal Renderer. In the Decals Renderer Feature, set Technique to Screen Space. _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
Decals that use Screen Space mode Universal Renderer. In the Decals Renderer Feature, set Technique to DBuffer. _DECAL_NORMAL_BLEND_LOW _DECAL_NORMAL_BLEND_MEDIUM _DECAL_NORMAL_BLEND_HIGH
Rendering layers for decals Universal Renderer. In the Decals Renderer Feature, disable Use Rendering Layers. _ _DECAL_LAYERS

Fog

Feature Location in the Editor Keyword set for Shader Build Settings
Fog Lighting window. In the Other Settings section, disable Fog. _ _FOG_LINEAR FOG_EXP FOG_EXP2

To keep fog but reduce shader variants by using dynamic branching, refer to Enable dynamic branching in prebuilt shaders.

Level of detail (LOD)

Feature Location in the Editor Keyword set for Shader Build Settings
LOD transitions URP asset. In the Quality section, disable LOD Cross Fade. _ LOD_FADE_CROSSFADE

For other ways to reduce LOD shader variants, refer to Strip LOD shader variants.

Lighting

Feature Location in the Editor Keyword set for Shader Build Settings
Additional lights (Forward rendering paths only) URP asset. In the Lighting section, set Additional Lights to Disabled. _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
Light cookies Light components. In the Emission section, remove cookie textures from all lights in your project. _ _LIGHT_COOKIES
Rendering layers for lights URP asset. For more information, refer to Rendering LayersA layer that defines how specific effects are applied across different objects. Rendering layers don’t define draw order. They’re selection groups you assign objects to. Rendering layers let lights, decals, shadows, and custom passes include or ignore specific objects.
See in Glossary
.
_ _LIGHT_LAYERS

Lightmapping

Feature Location in the Editor Keyword set for Shader Build Settings
Lightmaps Lightmapping settings. Disable Realtime Global Illumination and Baked Global Illumination. _ LIGHTMAP_ON
Directional lightmaps Lightmapping settings. Set Directional Mode to Non-Directional. _ DIRLIGHTMAP_COMBINED
Bicubic sampling of lightmaps Graphics settings. In the Lighting section, disable Use Bicubic Lightmap Sampling. _ LIGHTMAP_BICUBIC_SAMPLING

Materials

Feature Location in the Editor Keyword set for Shader Build Settings
Alpha clipping Material properties. In the Surface Options section, disable Alpha Clipping. _ _ALPHATEST_ON
Clear coat Material properties. In the Detail Inputs section, disable Clear coat for all Complex Lit materials. _ _CLEARCOAT _CLEARCOATMAP
Detail mapping Material properties. In the Detail Inputs section, remove the textures for all materials. _ _DETAIL_MULX2 _DETAIL_SCALED
Emission Material properties. In the Detail Inputs section, disable Emission for all materials. _ _EMISSION
Environment reflections Material properties. In the Advanced Options section, disable Environment Reflections. _ _ENVIRONMENTREFLECTIONS_OFF. Removing this keyword enables environment reflections.
Height maps Material properties. In the Surface Inputs section, remove the Height Map texture for all materials. _ _PARALLAXMAP
Metallic or specular maps Material properties. In the Surface Inputs section, remove the Metallic Map or Specular Map texture for all materials. _ _METALLICSPECGLOSSMAP
Normal maps Material properties. In the Surface Inputs section, remove the Normal Map texture for all materials. _ _NORMALMAP
Occlusion maps Material properties. In the Surface Inputs section, remove the Occlusion Map texture for all materials. _ _OCCLUSIONMAP
Shadows Material properties. In the Surface Options section, disable Receive shadows. _ _RECEIVE_SHADOWS_OFF. Set Override type to shader_feature or multi_compile. Removing this keyword enables GameObjects receiving shadows.
Smoothness from Base Map alpha Material properties. In the Surface Inputs section, under Metallic Map or Specular Map, set Source to Metallic Alpha or Specular Alpha. _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
Specular highlights Material properties. In the Advanced Options section, disable Specular Highlights. _ _SPECULARHIGHLIGHTS_OFF. Removing this keyword enables specular highlights.
Specular highlights on transparent materials Material properties. In the Surface Options section on all transparent materials, disable Preserve Specular Lighting and set Blending Mode to either Alpha, Premultiply, or Additive. _ _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
Specular setup Material properties. In the Surface Options section, set Workflow mode to Metallic for all materials. _ _SPECULAR_SETUP
Transparency In the Surface Options section of the Material properties, set Surface Type to Opaque for all materials. _SURFACE_TYPE_TRANSPARENT
Terrain holes URP asset. In the Rendering section. Disable Terrain Holes. N/A

Post-processing

Feature Location in the Editor Keyword set for Shader Build Settings
Bloom Volume Overrides. Remove the BloomA post-processing effect used to reproduce an imaging artifact of real-world cameras. The effect produces fringes of light extending from the borders of bright areas in an image, contributing to the illusion of an extremely bright light overwhelming the camera or eye capturing the scene.
See in Glossary
Volume Override.
_ _BLOOM_LQ _BLOOM_HQ _BLOOM_LQ_DIRT _BLOOM_HQ_DIRT
Chromatic Aberration Volume Overrides. Remove the Chromatic Aberration Volume Override. _ _CHROMATIC_ABERRATION
Depth of Field - high quality sampling Volume Overrides. In the Depth of FieldA post-processing effect that simulates the focus properties of a camera lens. More info
See in Glossary
Volume Override, disable High Quality Sampling.
_ _HIGH_QUALITY_SAMPLING
Dithering Camera properties. In the Rendering section, disable Dithering. _ _DITHERING
Film Grain Volume Overrides. Remove the Film Grain Volume Override. _ _FILM_GRAIN
Lens Distortion Volume Overrides. Remove the Lens Distortion Volume Override. _ _DISTORTION
Screen Space Ambient Occlusion (SSAO) Universal Renderer. Remove the Screen Space Ambient Occlusion Renderer Feature. _ _SCREEN_SPACE_OCCLUSION
Tonemapping Volume Overrides. Remove TonemappingThe process of remapping HDR values of an image into a range suitable to be displayed on screen. More info
See in Glossary
Volume Override.
_ _HDR_GRADING _TONEMAP_ACES _TONEMAP_NEUTRAL
Alpha processing URP asset. In the Post-processing section, disable Alpha Output. _ _ENABLE_ALPHA_OUTPUT

Rendering paths

Feature Location in the Editor Keyword set for Shader Build Settings
Accurate G-buffer normals (Deferred rendering paths only) Universal Renderer. In the Rendering section, disable Accurate G-buffer normals. This has no effect on platforms that use the Vulkan graphics API. _ _GBUFFER_NORMALS_OCT
Fast sRGB to linear conversion URP asset. In the Post-processing section, disable Fast sRGB/Linear conversions. _ _USE_FAST_SRGB_LINEAR_CONVERSION
Forward+ rendering path Universal Renderer. In the Rendering section, set Rendering Path to Forward+ or Deferred+. _ _CLUSTER_LIGHT_LOOP

Reflections

Feature Location in the Editor Keyword set for Shader Build Settings
Reflection Probe blending Reflection Probe properties. Disable Probe Blending for all Reflection Probes. _ _REFLECTION_PROBE_BLENDING
Reflection Probe box projection Reflection Probe properties. Disable Box Projection for all Reflection Probes. _ _REFLECTION_PROBE_BOX_PROJECTION
Reflection Probe rotation Graphics settings. In the Lighting section, disable Use Reflection Probe Rotation. _ REFLECTION_PROBE_ROTATION

Shadows

Feature Location in the Editor Keyword set for Shader Build Settings
Main lights cast shadows URP asset. In the Lighting section, under Main Light, disable Cast Shadows. _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
Additional lights cast shadows URP asset. In the Lighting section, under Additional Lights, disable Cast Shadows. _ _ADDITIONAL_LIGHT_SHADOWS
Point Lights cast shadows Light components. In the Shadows section, set Shadow Type to No Shadows for all Point Lights. _ _CASTING_PUNCTUAL_LIGHT_SHADOW
Soft shadows URP asset. In the Shadows section, disable Soft Shadows. _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH
Shadows from the Subtractive Lighting Mode URP asset. In the Lighting section, disable Mixed Lighting. _ LIGHTMAP_SHADOW_MIXING
Shadows from the Shadowmask Lighting Mode Lightmapping settings. Set Lighting Mode to Baked Indirect or Subtractive. _ SHADOWS_SHADOWMASK

Additional resources

Enable dynamic branching in shaders in URP
Shader Material Inspector window reference for URP