Version: Unity 6.5 Beta (6000.5)
Language : English
Set up your HDRP project to use URP
Convert Visual Effect Graph from HDRP to URP

Convert shaders from HDRP to URP

Converting High Definition 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
(HDRP) shadersA program that runs on the GPU. More info
See in Glossary
for Universal Render Pipeline (URP) compatibility differs depending on your shader setup.

HDRP and URP default shaders have different material types, features, and inputs. Converting HDRP shaders and materials to use URP might require you to do the following:

  • Reassign shaders to URP equivalents.
  • Remap material properties.
  • Compromise on missing features or implement a replacement.
  • Reauthor textures.
  • Create new shaders.

Tip: Automate this process using scriptsA 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. More info
See in Glossary
, especially for large projects.

For more information on supported shaders, refer to Render pipeline feature comparison.

Default shaders

Most default HDRP shaders and default URP shaders don’t map to each other. You must recreate the HDRP shaders manually in URP. For more information on writing custom shaders in URP, refer to Examples of writing a custom shader in URP.

The following table lists the HDRP shaders that have a corresponding URP shader to map to.

HDRP shader URP shader
HDRP/Lit Universal Render Pipeline/Lit. Use Universal Render Pipeline/Complex Lit if you have a Coat Mask texture.
HDRP/LitTessellation Universal Render Pipeline/Lit. Use Universal Render Pipeline/Complex Lit if you have a Coat Mask texture.
Note: Tessellation isn’t supported in URP. For an alternative solution, use the Parallax Occlusion Mapping node instead.
HDRP/TerrainThe landscape in your scene. A Terrain GameObject adds a large flat plane to your scene and you can use the Terrain’s Inspector window to create a detailed landscape. More info
See in Glossary
Lit
Universal Render Pipeline/Terrain/Lit
HDRP/Unlit Universal Render Pipeline/Unlit.
Note: Not all properties are supported in URP.

Convert Lit shaders from HDRP to URP

Surface types

The Surface Type property doesn’t map between HDRP and URP, so converting your shader to URP/Lit will break these settings. You must change these materials back to the correct surface types and blend modes.

Material types

Material Type in HDRP maps as follows:

  • Standard maps to the URP Workflow Mode of Metallic
  • Specular maps to the URP Workflow Mode of Specular

Other Material Type values don’t map to a URP equivalent.

To keep your settings for any materials that aren’t set to Standard or Specular, recreate them in a custom shader or Shader Graph.

Normal maps and scale

HDRP shaders use _NormalMap for the normal mapA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.
See in Glossary
and _NormalScale for the normal scale. URP uses _BumpMap and _BumpScale instead. You must remap these properties.

URP/Lit and URP/ComplexLit don’t have an equivalent to Bent Normal Map.

Mask map

In HDRP/Lit, the mask map relates to R: Metallic, G: AO, B: Detail Mask, and A: Smoothness. In URP/Lit, these are separate textures. These are channel-mapped so setting these maps with the Mask texture is recommended.

Detail inputs

The HDRP/Lit Detail Map doesn’t map to URP/Lit detail inputs. In HDRP, the detail map is a packed texture that contains multiple pieces of information that affect details of your material. URP uses separate Mask, Base Map, and Normal Map textures.

To recreate this texture in URP, do one of the following:

  • Create a custom shader or Shader Graph.
  • Create new Mask, Base Map, and Normal Map textures from the HDRP Mask Map and Detail Map textures.

Convert Unlit shaders from HDRP to URP

Surface types

The Surface type property doesn’t map between HDRP and URP, so converting your shader to URP/Unlit will break these settings. You must change these materials back to the correct surface types and blend modes.

Color and color map

HDRP shaders use _UnlitColor for color and _UnlitColorMap for color texture. URP uses _BaseColor and _BaseMap instead. You must remap these properties.

Emission inputs

URP/Unlit has no equivalent for emission. If you need to recreate emission in URP, you might be able to achieve the same result using _BaseColor and _BaseMap, or a custom shader or Shader Graph.

Shader Graph shaders

To convert a shader you created with Shader Graph, update the graph target to URP and update its fragment and vertex contexts.

There might be missing features, and URP doesn’t support some output nodes in HDRP fragment and vertex contexts.

If HDRP nodes have no URP equivalent, do one of the following:

Third-party shaders

If you use third-party shaders, contact the third party to understand their cross-platform support.

Custom shaders

If you created custom shaders in HDRP, you must rewrite them to be compatible with URP. This might take a significant amount of time if your shader is complex. For more information on how to write custom shaders in URP, refer to Examples of writing a custom shader in URP and Shader methods in URP.

Tip: To avoid breaking the original HDRP shader during the migration process, create a duplicate SubShader with the correct URP tags
See in Glossary
: { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" }.

If your shader writes into the G-buffer, use the PackGBuffersBRDFData method to pack data correctly. URP uses a different G-buffer layout than HDRP, so if you manually pack G-buffer data or use HDRP’s packing functions, your lighting will not work correctly.

If your shader accesses the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
texture of the render pipeline after a variety of passes, recreate this in URP with Opaque Texture, which is stored directly after the opaque pass. If an effect needs access to the camera texture at a different point in the render pipeline, create a Scriptable Renderer Feature.

Custom lit shaders

To convert a custom lit shader to be compatible with URP, you must do the following:

Custom unlit shaders

To convert a custom unlit shader to be compatible with URP, update the ShaderLab tags to use URP.

Additional resources

Set up your HDRP project to use URP
Convert Visual Effect Graph from HDRP to URP