Skip to content

Commit eb94a91

Browse files
sebastienlagardeJulienIgnace-Unityadrien-de-tocquevillejohnparsFrancescoC-unity
authored
[HDRP] Backprot various PRs to 10.x.X/release (#7229)
* Merge Hd/bugfix #6791 * Updated Physically Based Sky documentation with more warnings about warmup cost. #6498 * Rename vertex color mode option #6795 * Initial commit - update the docs (#6819) * [Hdrp] Merge Hd/bugfix #6954 * Fix for Final Image Histogram debug mode not working on some hardware #7041 * Add pragma renderer only for planar reflection preview shader #7058 * Revert shadow caching code * Update HDRenderPipeline.cs * Revert wrong backport of #6952 Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: John Parsaie <johnpa@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
1 parent 696f60f commit eb94a91

33 files changed

+148
-39
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
### Fixed
1010
- Render Graph object pools are now cleared with render graph cleanup to avoid stale pass data.
11-
11+
- Fixed sky jittering when TAA is enabled.
12+
- Fixed Normal Map assiignation when importing FBX Materials.
13+
- Fixed the default custom pass buffer format from R8G8B8A8_SNorm to R8G8B8A8_UNorm. Additionally, an option in the custom pass buffer format settings is available to use the old format.
14+
- Fixed an issue where sometimes full screen debug would cause render graph errors.
15+
- Fixed a nullref exception when creating a new scene while LightExplorer is open.
16+
- Fixed issue at edge of screen on some platforms when SSAO is on.
17+
- Fixed vertex color mode Add name whicgh was misleading, renamed to AddSubstract.
18+
- Fixed screen space shadow when multiple lights cast shadows.
19+
- Fixed issue with dynamic resolution and low res transparency sampling garbage outside of the render target.
20+
- Fixed issue with Final Image Histogram displaying a flat histogram on certain GPUs and APIs.
21+
1222
## [10.8.0] - 2021-09-20
1323

1424
### Fixed

com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Creating.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ However, not all materials are supported by every injection point in a draw rend
159159

160160
When Unity renders a material that is not supported by the current injection point, it results in an undefined behavior. For example, rendering GameObjects with lit shaders in the **After Opaque Depth And Normal** injection point produces unexpected results.
161161

162+
Note: HDRP does not support decals on GameObjects rendered in the DrawRenderers pass.
163+
162164
<a name="Custom-Renderers-Pass-shader"></a>
163165

164166
## Custom Renderers Pass shader
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# MatCap mode
22

3-
In MatCap mode, the High Definition Render Pipeline (HDRP) replaces the functionality of the Scene window's Lighting button with a material capture (MatCap) view. MatCap mode uses an image that completely captures a Material, including baked-in lighting. When using MatCap mode, HDRP replaces all of the Materials and lighting in the Scene with what is in the MatCap.
3+
In MatCap mode, the High Definition Render Pipeline (HDRP) replaces the functionality of the Scene view's Lighting button with a material capture (MatCap) view. MatCap mode uses an image that completely captures a Material, including baked-in lighting. When using MatCap mode, HDRP replaces all the Materials and lighting in the Scene with what's in the MatCap.
44

5-
MatCap mode is particularly useful to navigate and get a sense of the Scene without setting up the Scene lighting. For example, if you were to edit a dark area, like the inside of a cave, it would be difficult to navigate with low lighting MatCap mode makes it much easier to navigate in such dark areas.
5+
MatCap mode is useful to navigate and get a sense of the Scene without setting up the Scene lighting. For example, if you were to edit a dark area, like the inside of a cave, MatCap mode makes it much easier to navigate in this low lighting.
66

77
## Using MatCap
88

9-
To activate MatCap mode, disable the Lighting toggle in the Scene window.
9+
To activate MatCap mode, disable the Lighting toggle in the Scene view.
1010

1111
![](Images/MatCap1.png)
1212

13-
MatCap mode preserves the normal maps and you can use the original Material albedo. To configure MatCap mode, go to **Edit > Preferences > HD Render Pipeline** and use the following properties.
13+
MatCap mode preserves the normal maps and you can use the original Material albedo. To configure MatCap mode, go to **Edit** > **Preferences** > **HD Render Pipeline** and use the following properties.
1414

1515
## Properties
1616

1717
| **Property** | **Description** |
1818
| ----------------------------- | ------------------------------------------------------------ |
19-
| **Mix Albedo in MatCap Mode** | Enable the checkbox to make HDRP mix the albedo of the Material with its material capture. |
20-
| **MatCap Intensity Scale** | Set the intensity of the material capture. This increases the brightness of the Scene. This is especially useful if the albedo darkens the Scene considerably. |
19+
| **Mix Albedo in MatCap Mode** | Enable to make HDRP mix the albedo of the Material with its material capture. |
20+
| **MatCap Intensity Scale** | Set the intensity of the material capture. This increases the brightness of the Scene. This is useful if the albedo darkens the Scene considerably. |
2121

2222
## Default material captures
2323

@@ -32,11 +32,11 @@ You can also activate MatCap view as a **Lighting Debug Mode** in the [Render Pi
3232

3333
## MatCap examples
3434

35-
MatCap off:
3635
![](Images/MatCap2.png)
36+
MatCap off
3737

38-
MatCap on:
3938
![](Images/MatCap3.png)
39+
MatCap on
4040

41-
MatCap on with albedo:
42-
![](Images/MatCap4.png)
41+
![](Images/MatCap4.png)
42+
MatCap on with albedo

com.unity.render-pipelines.high-definition/Documentation~/Override-Physically-Based-Sky.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,21 @@ The default values in either mode make it so the planet's surface is at **0** on
132132

133133
## Warmup cost
134134

135-
This sky type requires heavy precomputation to be rendered. Because of this, the first few frames (depending on the *Number of bounces* parameter) are going to take much longer. This needs to be taken into consideration when switching from another sky type to the Physically Based Sky for example as it might produce a noticeable drop in framerate.
135+
When you switch to or from a Physically Based Sky, it might cause a noticeable drop in framerate. This is because HDRP performs a large amount of precomputations to render a Physically Based Sky, so the first few frames (depending on the Number of bounces parameter) takes more time to render than other HDRP sky types.
136+
This also applies when HDRP uses the volume system to interpolate between two different Physically Based Skies with different sets of parameters. To do this, HDRP restarts the precomputation every frame in which it performs interpolation. This causes a noticeable drop in framerate. To avoid this, use a single set of Physically Based Sky parameters for a scene and change the sun light direction and intensity to achieve the result you want.
137+
138+
HDRP restarts precomputation when you change the following parameters:
139+
- Type
140+
- Planetary Radius
141+
- Ground Tint
142+
- Air Maximum Altitude
143+
- Air Density
144+
- Air Tint
145+
- Aerosol Maximum Altitude
146+
- Aerosol Density
147+
- Aerosol Tint
148+
- Aerosol Anisotropy
149+
- Number of Bounces
136150

137151
### Reference list
138152

com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Bloom.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ From 2019.3, HDRP provides lookup Textures that you can use to customize this ef
5454
2. In the **Packages** window, select **High Definition RP**.
5555
3. In the **High Definition RP** section, navigate to **Additional Post-processing Data** and click **Import into Project** next to it.
5656
4. The Textures that are relevant to Bloom are in the **Lens Dirt** folder, so if you only want the lookup Textures for Bloom, only import the contents of the **Lens Dirt** folder.
57+
58+
59+
Care is needed when using the Bloom effect with [Chromatic Abberation](Post-Processing-Chromatic-Aberration.md). For performance reasons, Chromatic Aberation is computed after the Bloom computation. This results in Bloom overpowering the Chromatic Aberration effect when the Bloom Intensity is set to a very high value. However, in a typical Bloom configuration, the Intensity should never need to be set high enough for this to be an issue.

com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Chromatic-Aberration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ From 2019.3, HDRP provides lookup Textures that you can use to customize this ef
3131
2. In the **Packages** window, select **High Definition RP**.
3232
3. In the **High Definition RP** section, navigate to **Additional Post-processing Data** and click **Import into Project** next to it.
3333
4. The Textures that are relevant to Chromatic Aberration are in the **Spectral LUTs** folder, so if you only want the lookup Textures for Chromatic Aberration, only import the contents of the **Spectral LUTs** folder.
34+
35+
Care is needed when using the [Bloom](Post-Processing-Bloom.md) effect with Chromatic Abberation. For performance reasons, Chromatic Aberation is computed after the Bloom computation. This results in Bloom overpowering the Chromatic Aberration effect when the Bloom Intensity is set to a very high value. However, in a typical Bloom configuration, the Intensity should never need to be set high enough for this to be an issue.

com.unity.render-pipelines.high-definition/Documentation~/VR-Overview.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Please refer to [Unity XR](https://docs.unity3d.com/Manual/XR.html) documentatio
66

77
## Recommended Settings
88

9-
HDRP has been designed to fully support Single-Pass Instanced mode. This mode gives you the best performance on all platforms.
10-
HDRP also supports multi-pass but this is slower on the CPU and some features, like Auto-Exposure, can cause issues.
9+
Unity has designed HDRP to fully support Single-Pass Instanced mode. This mode gives you the best performance on all platforms.
10+
HDRP also supports multi-pass but this is slower on the CPU and some features, like Auto Exposure, can cause issues.
1111
If you encounter a problem with a specific feature, you can disable it in your Project’s [HDRP Asset](HDRP-Asset.md).
1212

1313
You can also watch the presentation from Unite Copenhagen (October 2019) to learn more tips: [Maximizing visual fidelity in VR: HDRP support](https://youtu.be/_WkSAn55EBM)
@@ -21,19 +21,20 @@ You can also watch the presentation from Unite Copenhagen (October 2019) to lear
2121
* PlayStationVR
2222
* Open VR*
2323

24-
Note: Valve is currently developing their OpenVR Unity XR plugin for 2019.3 and beyond.
24+
**Note**: Valve is currently developing their OpenVR Unity XR plugin for 2019.3 and beyond.
2525
For more information, see [Unity XR platform updates](https://blogs.unity3d.com/2020/01/24/unity-xr-platform-updates/) on the Unity blog, and [XR Plugin Architecture](https://docs.unity3d.com/Manual/XRPluginArchitecture.html) in the Unity Manual.
2626
The XR Plugin architecture links to the OpenVR desktop package and has further info and recommendations.
2727

2828
## Resolution Control
29-
There are multiple methods that you can use to control the resolution of your render targets in HDRP, but be aware that HDRP does not support every method available in standard Unity using the built-in render pipeline. [XRSettings.renderViewportScale](https://docs.unity3d.com/ScriptReference/XR.XRSettings-renderViewportScale.html) has no effect in HDRP and generates a warning if you use it. Use one of the following methods instead:
29+
There are multiple methods that you can use to control the resolution of your render targets in HDRP, but be aware that HDRP doesn't support every method available in standard Unity using the built-in render pipeline. [XRSettings.renderViewportScale](https://docs.unity3d.com/ScriptReference/XR.XRSettings-renderViewportScale.html) has no effect in HDRP and generates a warning if you use it. Use one of the following methods instead:
3030
* **Dynamic Resolution**: You can use the [dynamic resolution system](Dynamic-Resolution.md) to change the resolution at runtime. This is the best method to use if you want to change the resolution at runtime.
3131
* **Eye Texture**: You can set the device back-buffer resolution by changing [XRSettings.eyeTextureResolutionScale](https://docs.unity3d.com/ScriptReference/XR.XRSettings-eyeTextureResolutionScale.html). This is a resource intensive operation that reallocates all render targets.
3232

33-
Be aware that SteamVR will apply a default 150% supersampling value. You can change this value in the settings of SteamVR.?
33+
Be aware that SteamVR will apply a default 150% supersampling value. You can change this value in the settings of SteamVR.
34+
3435
## Enable VR single-pass after startup
3536

36-
Due to some technical limitations that will be resolved in later versions, you need the following code in your script if your app does not boot directly in VR mode:
37+
**Note**: Due to some technical limitations that Unity will resolve in later versions of HDRP, you need the following code in your script if your app doesn't boot directly in VR mode:
3738

3839
```csharp
3940
private void Awake()
@@ -46,6 +47,6 @@ private void Awake()
4647

4748
You can use the following defines to include or exclude code from your scripts.
4849

49-
* ENABLE_VR: The C++ side of the engine sets this define to indicate if the platform supports VR.
50+
* ENABLE_VR: The C++ side of the engine sets this define to specify if the platform supports VR.
5051
* ENABLE_VR_MODULE: Unity sets this define if your Project includes the [built-in VR module com.unity.modules.vr](https://docs.unity3d.com/Manual/upm-ui-disable.html).
5152
* ENABLE_XR_MODULE: Unity sets this define if your Project includes the [built-in XR module com.unity.modules.xr](https://docs.unity3d.com/Manual/upm-ui-disable.html).

com.unity.render-pipelines.high-definition/Documentation~/snippets/shader-properties/surface-inputs/layered-surface-inputs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| **World Scale** | Set the world-space size of the Texture in meters. If you set this to **1**, then HDRP maps the Texture to 1 meter in world space.If you set this to **2**, then HDRP maps the Texture to 0.5 meters in world space.This property only appears when you select **Planar** or **Triplanar** from the **BlendMask UV Mapping** drop-down. |
77
| **Tiling** | Set an **X** and **Y** tile rate for the **Layer Mask** UV. HDRP uses the **X** and **Y** values to tile the Texture assigned to the **Layer Mask** across the Material’s surface, in object space. |
88
| **Offset** | Set an **X** and **Y** offset for the **Layer Mask** UV. HDRP uses the **X** and **Y** values to offset the Texture assigned to the **Layer Mask** from the Material’s surface, in object space. |
9-
| **Vertex Color Mode** | Use the drop-down to select the method HDRP uses to combine the **Layer Mask** to manager layer visibility.<br/>&#8226; **None**: Only the **Layer Mask** affects visibility. HDRP does not combine it with vertex colors.<br/>&#8226; **Multiply**: Multiplies the vertex colors from a layer with the corresponding values from the channel in the **Layer Mask** that represents that layer. The default value for a pixel in the mask is 1. Multiplying the vertex colors of a layer by the **Layer Mask** reduces the intensity of that layer, unless the value in the **Layer Mask** is 1.<br/>&#8226; **Add**: Remaps vertex color values to between -1 and 1, and then adds them to the corresponding values from the channel in the **Layer Mask** that represents that layer. Vertex color values between 0 and 0.5 reduce the effect of that layer, values between 0.5 and 1 increase the effect of that layer. |
9+
| **Vertex Color Mode** | Use the drop-down to select the method HDRP uses to combine the **Layer Mask** to manager layer visibility.<br/>&#8226; **None**: Only the **Layer Mask** affects visibility. HDRP does not combine it with vertex colors.<br/>&#8226; **Multiply**: Multiplies the vertex colors from a layer with the corresponding values from the channel in the **Layer Mask** that represents that layer. The default value for a pixel in the mask is 1. Multiplying the vertex colors of a layer by the **Layer Mask** reduces the intensity of that layer, unless the value in the **Layer Mask** is 1.<br/>&#8226; **AddSubstract**: Remaps vertex color values to between -1 and 1, and then adds them to the corresponding values from the channel in the **Layer Mask** that represents that layer. Vertex color values between 0 and 0.5 reduce the effect of that layer, values between 0.5 and 1 increase the effect of that layer. |
1010
| **Main Layer Influence** | Enable the checkbox to allow the **Main Layer** to influence the albedo, normal, and height of **Layer 1**, **Layer 2**, and **Layer 3**. You can change the strength of the influence for each layer. |
1111
| **Use Height Based Blend** | Enable the checkbox to blend the layers with a heightmap. HDRP then evaluates the height of each layer to check whether to display that layer or the layer above. |
1212
| **Height Transition** | Use the slider to set the transition blend size between the Materials in each layer. |

com.unity.render-pipelines.high-definition/Editor/AssetProcessors/FBXMaterialDescriptionPostprocessor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat
111111

112112
if (description.TryGetProperty("Bump", out textureProperty) && textureProperty.texture != null)
113113
{
114-
SetMaterialTextureProperty("_BumpMap", material, textureProperty);
114+
SetMaterialTextureProperty("_NormalMap", material, textureProperty);
115115

116116
if (description.TryGetProperty("BumpFactor", out floatProperty))
117-
material.SetFloat("_BumpScale", floatProperty);
117+
material.SetFloat("_NormalScale", floatProperty);
118118
}
119119
else if (description.TryGetProperty("NormalMap", out textureProperty) && textureProperty.texture != null)
120120
{
121-
SetMaterialTextureProperty("_BumpMap", material, textureProperty);
121+
SetMaterialTextureProperty("_NormalMap", material, textureProperty);
122122

123123
if (description.TryGetProperty("BumpFactor", out floatProperty))
124-
material.SetFloat("_BumpScale", floatProperty);
124+
material.SetFloat("_NormalScale", floatProperty);
125125
}
126126

127127
if (description.TryGetProperty("EmissiveColor", out textureProperty))

0 commit comments

Comments
 (0)