Skip to content

Commit 53b221c

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [Forward] DOCG-8343 & DOCG-8344 Render Pipeline Converter for HDRP and URP 2D
1 parent 5ec8c85 commit 53b221c

4 files changed

Lines changed: 71 additions & 13 deletions

File tree

Packages/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* [Convert lighting and shadows](convert-from-built-in-convert-lighting-and-shadows.md)
5151
* [Convert materials and shaders](convert-from-built-in-convert-materials-and-shaders.md)
5252
* [Convert project with HDRP wizard](convert-from-built-in-convert-project-with-hdrp-wizard.md)
53+
* [Render Pipeline Converter window reference](rp-converter.md)
5354
* [Lighting](lighting.md)
5455
* [Understand physical light units](Physical-Light-Units.md)
5556
* [Light sources](light-sources.md)
Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,80 @@
11
# Convert materials and shaders
22

3-
To upgrade the Materials in your Scene to HDRP-compatible Materials:
3+
After you [set up your project to use HDRP](convert-from-built-in-convert-project-with-hdrp-wizard.md), use the material upgraders or the [Render Pipeline Converter](rp-converter.md) to convert prebuilt material and shaders made for a Built-In Render Pipeline project to be compatible with the High Definition Render Pipeline (HDRP).
4+
5+
Material upgraders and the Render Pipeline Converter don't support converting custom materials or shaders. To convert custom materials and shaders, you must [convert them manually](#ManualConversion).
6+
7+
**Warning**: Using material upgraders or the Render Pipeline Converter overwrites several files in your project folder. These can't be restored after Unity overwrites them. Before you start this task, back up any files you don't want to lose.
8+
9+
## Convert materials and shaders using material upgraders
10+
11+
To upgrade the materials and shaders from the Built-In Render Pipeline to HDRP with material upgraders, do the following:
412

513
1. Go to **Edit** > **Rendering** > **Materials**
614
2. Choose one of the following options:
715

8-
* **Convert All Built-in Materials to HDRP**: Converts every compatible Material in your Project to an HDRP Material.
9-
* **Convert Selected Built-in Materials to HDRP**: Converts every compatible Material currently selected in the Project window to an HDRP Material.
10-
* **Convert Scene Terrains to HDRP Terrains**: Replaces the built-in default standard terrain Material in every [Terrain](https://docs.unity3d.com/Manual/script-Terrain.html) in the scene with HDRP default Terrain Material.
16+
* **Convert All Built-in Materials to HDRP**: Converts every compatible material in your project to an HDRP material.
17+
* **Convert Selected Built-in Materials to HDRP**: Converts every compatible material currently selected in the Project window to an HDRP Material.
18+
* **Convert Scene Terrains to HDRP Terrains**: Replaces the built-in default standard terrain material in every [Terrain](https://docs.unity3d.com/Manual/script-Terrain.html) in the scene with HDRP default Terrain material.
1119

12-
## Limitations
20+
### Limitations
1321

14-
The automatic upgrade options described above can't upgrade all Materials to HDRP correctly:
22+
The automatic upgrade options described can't upgrade all materials to HDRP correctly:
1523

16-
* You can't automatically upgrade custom Materials or Shaders to HDRP. You must [convert custom Materials and Shaders manually](#ManualConversion).
1724
* HDRP can only convert materials from the **Assets** folder of your project. HDRP uses the [error shader](xref:shader-error) for GameObjects that use the default read-only material from the Built-In Render Pipeline, for example [primitives](xref:um-primitive-objects).
18-
* Height mapped Materials might look incorrect. This is because HDRP supports more height map displacement techniques and decompression options than the Built-in Render Pipeline. To upgrade a Material that uses a heightmap, modify the Material's **Amplitude** and **Base** properties until the result more closely matches the Built-in Render Pipeline version.
25+
* Height mapped materials might look incorrect. This is because HDRP supports more height map displacement techniques and decompression options than the Built-In Render Pipeline. To upgrade a material that uses a heightmap, modify the Material's **Amplitude** and **Base** properties until the result more closely matches the Built-In Render Pipeline version.
1926
* You can't upgrade particle shaders. HDRP doesn't support particle shaders, but it does provide Shader Graphs that are compatible with the [Built-in Particle System](https://docs.unity3d.com/Manual/Built-inParticleSystem.html). These Shader Graphs work in a similar way to the built-in particle shaders. To use these Shader Graphs, import the **Particle System Shader Samples** sample:
2027

2128
1. Open the Package Manager window (menu: **Window** > **Package Management** > **Package Manager**).
2229
2. Find and click the **High Definition RP** entry.
2330
3. In the package information for **High Definition RP**, go to the **Samples** section and click the **Import into Project** button next to **Particle System Shader Samples**.
2431

32+
<a name="render-pipeline-converter"></a>
33+
34+
## Convert shaders using the Render Pipeline Converter
35+
36+
To convert prebuilt shaders from the Built-In Render Pipeline to HDRP with the Render Pipeline Converter, do the following:
37+
38+
1. Go to **Window** > **Rendering** > **Render Pipeline Converter**.
39+
40+
Unity opens the [Render Pipeline Converter window](rp-converter.md).
41+
2. Set **Source Pipeline** to **Built-in**.
42+
3. Set **Target Pipeline** to **High Definition Render Pipeline (HDRP)**.
43+
4. Select the checkbox next to **Material Shader Converter**.
44+
5. Select **Scan**.
45+
46+
Unity processes the assets in your project and displays the list of shaders it can convert under your selected converter.
47+
6. Select the checkboxes next to the assets you want to convert.
48+
7. Select **Convert Assets**.
49+
50+
When Unity finishes the conversion process, the window displays the status of each conversion.
51+
52+
### Shader mapping
53+
54+
The following table shows which HDRP resource path the Built-In Render Pipeline materials map to when you use the Render Pipeline Converter.
55+
56+
| **Built-In Render Pipeline material** | **HDRP resource path** |
57+
| ------------------------------------- | ------------------------------------------------------------------------ |
58+
| `Default-Diffuse` | `Runtime/RenderPipelineResources/Material/DefaultHDMaterial.mat` |
59+
| `Default-Material` | `Runtime/RenderPipelineResources/Material/DefaultHDMaterial.mat` |
60+
| `Default-ParticleSystem` | `Runtime/RenderPipelineResources/Material/DefaultHDParticleMaterial.mat` |
61+
| `Default-Particle` | `Runtime/RenderPipelineResources/Material/DefaultHDParticleMaterial.mat` |
62+
| `Default-Terrain-Diffuse` | `Runtime/RenderPipelineResources/Material/DefaultHDTerrainMaterial.mat` |
63+
| `Default-Terrain-Specular` | `Runtime/RenderPipelineResources/Material/DefaultHDTerrainMaterial.mat` |
64+
| `Default-Terrain-Standard` | `Runtime/RenderPipelineResources/Material/DefaultHDTerrainMaterial.mat` |
65+
2566
<a name="ManualConversion"></a>
2667

27-
## Converting Materials manually
68+
## Convert materials manually
2869

29-
HDRP uses multiple processes to automatically convert Built-in Standard and Unlit Materials to HDRP Lit and Unlit Materials respectively. These processes use an overlay function to blend the color channels together, similar to the process you would use in image editing software like Adobe Photoshop.
70+
HDRP uses multiple processes to automatically convert Built-in Standard and Unlit Materials to HDRP Lit and Unlit materials respectively. These processes use an overlay function to blend the color channels together, similar to the process you would use in image editing software like Adobe Photoshop.
3071

31-
To help you convert custom Materials manually, this section describes the maps that the converter creates from the Built-in Materials.
72+
To help you convert custom materials manually, this section describes the maps that the converter creates from the Built-in Materials.
3273

3374
### Mask maps
3475

35-
The Built-in Shader to HDRP Shader conversion process combines the different Material maps of the Built-in Standard Shader into the separate RGBA channels of the mask map in the HDRP [Lit Material](lit-material.md). For information on which color channel each map goes in, see [mask map](Mask-Map-and-Detail-Map.md#MaskMap).
76+
The Built-in Shader to HDRP Shader conversion process combines the different material maps of the Built-in Standard Shader into the separate RGBA channels of the mask map in the HDRP [Lit Material](lit-material.md). For information on which color channel each map goes in, refer to [Mask map](Mask-Map-and-Detail-Map.md#MaskMap).
3677

3778
### Detail maps
3879

39-
The Built-in Shader to HDRP Shader conversion process combines the different detail maps of the Built-in Standard Shader into the separate RGBA channels of the detail map in the HDRP [Lit Material](lit-material.md). It also adds a smoothness detail too. For information on which color channel each map goes in, see [detail map](Mask-Map-and-Detail-Map.md#DetailMap).
80+
The Built-in Shader to HDRP Shader conversion process combines the different detail maps of the Built-in Standard Shader into the separate RGBA channels of the detail map in the HDRP [Lit Material](lit-material.md). It also adds a smoothness detail too. For information on which color channel each map goes in, refer to [Detail map](Mask-Map-and-Detail-Map.md#DetailMap).

Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-project-from-built-in-render-pipeline.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ The High Definition Render Pipeline (HDRP) uses a new set of shaders and lightin
88
| [Convert lighting and shadows](convert-from-built-in-convert-lighting-and-shadows.md) | Convert a project to physical Light units to control the intensity of Lights, instead of the arbitrary units the Built-in Render Pipeline uses. |
99
| [Convert materials and shaders](convert-from-built-in-convert-materials-and-shaders.md) | Upgrade the materials in your scene to HDRP-compatible materials, either automatically or manually. |
1010
| [Convert project with HDRP wizard](convert-from-built-in-convert-project-with-hdrp-wizard.md) | Add the HDRP package to a Built-in Render Pipeline project and set up HDRP. |
11+
| [Render Pipeline Converter window reference](rp-converter.md) | Explore the settings in the Render Pipeline Converter. |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Render Pipeline Converter window for HDRP reference
2+
3+
After you [set up your project to use HDRP](convert-from-built-in-convert-project-with-hdrp-wizard.md), you can use the Render Pipeline Converter to convert shaders made for a Built-In Render Pipeline project to assets compatible with the High Definition Render Pipeline (HDRP).
4+
5+
To open the Render Pipeline Converter window, go to **Window** > **Rendering** > **Render Pipeline Converter**. For more information on how to use the Render Pipeline Converter for HDRP, refer to [Convert materials and shaders](convert-from-built-in-convert-materials-and-shaders.md#render-pipeline-converter).
6+
7+
**Warning**: Using the Render Pipeline Converter overwrites several files in your project folder. These can't be restored after Unity overwrites them. Before you start this task, back up any files you don't want to lose.
8+
9+
## Pipeline Converter tab
10+
11+
| **Property** | **Description** |
12+
|:-------------|:----------------|
13+
| **Source Pipeline** | Sets the pipeline you want to convert your assets from. |
14+
| **Target Pipeline** | Sets the pipeline you want to convert your assets to. |
15+
| **Material Shader Converter** | Converts [prebuilt shaders for the Built-In Render Pipeline](https://docs.unity3d.com/Manual/shader-built-in-birp.html) to [shaders in HDRP](materials-and-surfaces.md). This converter doesn't support custom shaders. For more information on how to convert custom shaders for HDRP, refer to [Convert materials manually](convert-from-built-in-convert-materials-and-shaders.md#ManualConversion).|

0 commit comments

Comments
 (0)