Skip to content

Commit 3b44398

Browse files
sebastienlagardeanisunityremi-chapelainJulienIgnace-UnityJordanL8
authored
[7.x.x] Merge 7.x.x/hd/staging (#581)
* [7.x.x Backport] Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). (#6507) * - Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). * Small fix to avoid text overlapping too much Co-authored-by: Remi Chapelain <[email protected]> * Fixed an usage of a a compute buffer not bound (1229964) (#28) Co-authored-by: Anis <[email protected]> * Removed wrongly serialized fields in StaticLightingSky (#6441) * Fix issues in the post process system with RenderTexture being invalid in some cases. Causing rendering problems. #6480 * Update PostProcessSystem.cs * Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. #6493 * Hdrp/docs/glossary f number (#6523) * Update Glossary.md * Update Glossary.md * Clamp probes compression factor to 0 (#19) * path validation when creating new volume profile (#36) * [Backport 7.x.x] Fix various leaks in HDRP (#120) * Fixed a number of leak in HDRP # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs * Update changelog * [7.x.x backport] Follow references when deleting unloading unused assets on shader graph save (case 1230996) (#128) * Follow references when unloading unneeded assets * changelog Co-authored-by: sebastienlagarde <[email protected]> * [7.x.x Backport] Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). (#21) * Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). * update ssr screenshot Co-authored-by: sebastienlagarde <[email protected]> * d Fix MSAA resolve when there is no motion vectors #1 * Fix issues causing planar probes to be broken with multiple cameras in the scene #4 * Pospow and SG triplanar fix #40 * Hdrp/fix/custom pass msaa rendering info #42 * Added disocclusion and ghosting to the glossary (#75) * Update the scripting API for FrameSettings, FrameSettingsOverrideMask and IBitArray (#110) * fix switch shader compilation (#111) * Update SceneViewDrawMode.cs (#118) * Fix culling of reflection probes that change position #121 * Fix null reference when processing light probe #131 * Fix black screen in XR when HDRP package is present but not used #137 * Fix default volume profile collapse #138 * Fix for white flash happening when changing lighting condition (like teleport) #140 * Added baked GI rp support caveat and made setting shadow filter quality clearer for deferred high. (#145) * Update AxF-Shader.md (#152) * Bind missing buffer #159 * [Backport 7.x.x] Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. (#179) * Added external references inside a material to diffusion profiles and materials in order to handle Material export to a package correctly. # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs * Update changelog * Catch and handle NRefactory parser exceptions #6392 * [7.x.x backport] Fix quality settings UI and shadow mask UI #122 (#123) * Update HDRenderPipeline.cs * Update HDRenderPipeline.cs * Update HDRenderPipeline.cs * Update CHANGELOG.md * fix typo * fix typo 2 * Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). (#284) * [7.x.x Backport] Fix pre/post pass sg properties #82 (#85) * Fix depth pre/post passes not correctly enabled when switching shaders on the material # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs # com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs # com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs * Hide prepass and postpass in the material UI # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs Co-authored-by: sebastienlagarde <[email protected]> * Fixed a performance issue with stochastic ray traced area shadows. (#306) Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Updated raytracing async compute warning. (#304) * Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. * Update changelog Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Fixed a null ref exception in static sky when the default volume profile is invalid. (#303) * Fixed a null ref exception in static sky when the default volume profile is invalid. * Update changelog * [Backport 7.x.x] Fixed an error about procedural sky being logged by mistake. (#307) * Fixed an error about procedural sky being logged by mistake. * Update changelog Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Fix flickering lighting in the scene and game view when lookdev is open. (#379) * Fixed flickering of the game/scene view when lookdev is running. * Update changelog * [7.x.x Backport] Fix issue with ambient probe not being correct with OnEnable/OnDemand probes (#317) * render until ambient probe is ready * remove comment * changelog * [Backport 7.x.x] Fixed some gcalloc in the debug window (#464) * Fixed some GCAlloc in the debug window # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Debug/VolumeDebug.cs * Update changelog * [Backport 7.x.x] Hdrp/small ui update (#466) * Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs # com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs * update changelog * [Backport 7.x.x] PBR Sky renderer now shares its internal precomputation table between different instances. (#482) * PBR Sky renderer now shares its internal precomputation table between different instances. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs * Doc update * Update changelog * [Backport 7.x.x] New tooltip for camera background and fixed exposure when switching the background mode. (#480) * Put more information in Camera background type tooltip and fixed inconsistent exposure behavior when changing bg type. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs * Update changelog * [Backport 7.x.x] Fixed asset preview being rendered white because of static lighting sky. (#479) * Fixed an issue where asset preview could be rendered white because of static lighting sky. Also fixed an issue where static lighting was not updated when removing the static lighting sky profile. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs * Update changelog * Changed UI name, tooltip, and doc for maximum decals on screen (#232) Implements feedback from https://fogbugz.unity3d.com/f/cases/1189618/ * Update Custom-Post-Process.md (#233) * Update HDRP-Features.md (#235) * Hdrp/reflection probe scale perf #252 * HD: Switch to 1920x1080 default standalone resolution (#279) Well, the default is "fullscreen desktop resolution" anyway, so this does not change anything at default settings. But, if user unchecks the "default native fullscreen", then it was going into 1024x768 on Standalone platform. Which was the most popular resolution back in year 2005. In year 2019, the 1920x1080 is the most popular, so make that the default. See also: https://ono.unity3d.com/unity/unity/pull-request/105219/_/desktop/default-res (moved https://github.cds.internal.unity3d.com/unity/com.unity.template-hd/pull/33 to this new repo) * Makes sure quaternion is normalized and valid before converting to ma… #331 * Fix cookie srgb #297 * Updated forward and deferred rendering definitions (#350) * Update Forward-And-Deferred-Rendering.md * Update Forward-And-Deferred-Rendering.md * Update Light-Component.md (#357) * Hd/add layer modification on generated emissive mesh for area light #364 * Update Look-Dev-Environment-Library.md (#365) * Update Volumetric-Lighting.md (#402) Fixes https://fogbugz.unity3d.com/f/cases/1238592 * Hd/fix nullref while removing decal component #416 * Fix issue with Uber Post process shader when alpha is enabled #422 * Fix the bug (#430) * Fix issue causing not all baked reflection probes to be deleted #441 * Updated Decal Projector doc (#477) Updated Limitations section and added a disclaimer about decal shader stripping. * Look Dev docs refactor 2 #484 * [7.x.x Backport] Fix issue with corrupted values with Layer Lit when using multiply mode for vertex color (#425) * Saturate vertex color to avoid negative values. * changelog Co-authored-by: sebastienlagarde <[email protected]> * Fix Motion Vectors written by transparent when rendering with MSAA #315 * Fix issue with the resolve of motion vectors (#421) * fix issue with ShowPrePassAndPostPass * fix compilation issue in rendergraph * Fixed null reference exception in LookDev when setting the SRP to None #447 * Check reflection probe null pointer before use. (case 1244047) #456 * Remove max atlas probe alloc size in HDRP asset (#458) * Fixed max alloc planar size not taking in account the max cache size * Removed the max cache clamp on texture atlases * Fix few multi-editing issues with Emission UI #473 * Re-enable cubemap thumbnail gen only for d3d11 #487 * Hd/fix undo environmentlibrary lookdev #490 * Added system requirements and frame settings api docs (#510) * Added system requirements and frame settings api doc * Update System-Requirements.md Co-authored-by: sebastienlagarde <[email protected]> * hide exposure compensation for fixed exposure (#535) * hide exposure compensation for fixed exposure * Update PostProcessSystem.cs * [9.x.x] Fix Microshadow not working properly with LightLayers enabled in deferred #522 * Use path relative to package for depth of field #523 * Fix taaFrameIndex and restore TAA tests for XR #534 * Fix an issue in reading the gbuffer for ray traced subsurface scattering (#538) * fix DXR manifest * update reference screenshots * Clone in the Asset folder when the original volume profile is in a re… #508 * Add support for batchmode (#542) * Update Reflection-Probes-Intro.md (#548) * Added note on decal emission on transparent surfaces (#567) * Update Decal-Projector.md * Update Decal-Projector.md * Update Decal-Projector.md * Added terrain lit doc (#573) * Add terrain lit doc * Update HDRP-Features.md * Update HDRP-Features.md * Hd/fix wizard defaultvolumeprofile creation #565 Co-authored-by: anisunity <[email protected]> Co-authored-by: Remi Chapelain <[email protected]> Co-authored-by: Anis <[email protected]> Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: JordanL8 <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: Adrien de Tocqueville <[email protected]> Co-authored-by: slunity <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: Remi Slysz <[email protected]> Co-authored-by: Pavlos Mavridis <[email protected]> Co-authored-by: Fabien Houlmann <[email protected]> Co-authored-by: victor <[email protected]> Co-authored-by: fredericv-unity3d <[email protected]> Co-authored-by: Aras Pranckevičius <[email protected]> Co-authored-by: Emmanuel Turquin <[email protected]> Co-authored-by: skhiat <[email protected]>
1 parent 64bd64a commit 3b44398

File tree

8 files changed

+70
-5
lines changed

8 files changed

+70
-5
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9191
- Tentative fix for missing include in depth of field shaders.
9292
- Fix an issue in reading the gbuffer for ray traced subsurface scattering (case 1248358).
9393
- Cloned volume profile from read only assets are created in the root of the project. (case 1154961)
94+
- Fixed Wizard check on default volume profile to also check it is not the default one in package.
9495

9596
### Changed
9697
- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.

com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ Using the Inspector allows you to change all of the Decal Projector properties,
4545
## Limitations
4646

4747
- If you project a decal onto a transparent surface, HDRP ignores the decal's Texture tiling.
48+
- When you project a decal onto a surface, the emissive component of the decal affects the surface regardless of whether you enable **Receive Decal** on the surface's Material or not.
4849
- In **Project Settings > Graphics**, if **Instancing Variants** is set to **Strip All**, Unity strips the Decal Shader this component references when you build your Project. This happens even if you include the Shader in the **Always Included Shaders** list. If Unity strips the Shader during the build process, the decal does not appear in your built Application.

com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Use Volumes to localize environmental Scene settings and post-processing effects
4040
HDRP Shaders allow you to use the following features:
4141

4242
- [Opaque/transparent surfaces](Surface-Type.md).
43-
4443
- Different blend modes for transparent surfaces.
4544
- Transparent surfaces that work with fog.
4645
- Refraction and distortion for transparent surfaces.
@@ -116,7 +115,7 @@ The Decal Shader allows you to place decals on surfaces in your Scene. To apply
116115

117116
![](Images/HDRPFeatures-TerrainShader.png)
118117

119-
The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader.
118+
The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader. For more information, including the full list of Shader properties, see the [Terrain Lit Shader documentation](Terrain-Lit-Shader.md).
120119

121120
<a name="Lighting"></a>
122121

Lines changed: 3 additions & 0 deletions
Loading

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
* [Layered Lit Shader](Layered-Lit-Shader)
6464
* [Lit Tessellation Shader](Lit-Tessellation-Shader)
6565
* [Lit Shader](Lit-Shader)
66+
* [Terrain Lit Shader](Terrain-Lit-Shader.md)
6667
* [Unlit Shader](Unlit-Shader)
6768
* Shader Graph Master Nodes
6869
* [Customizing Materials Using Master Nodes](Customizing-HDRP-materials-with-Shader-Graph)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# **Terrain Lit Shader**
2+
3+
The High Definition Render Pipeline (HDRP) uses the Terrain Lit Shader for Unity Terrain. This Shader is a simpler version of the [Lit Shader](Lit-Shader.md). A Terrain can use a Terrain Lit Material with up to eight [Terrain Layers](https://docs.unity3d.com/Manual/class-TerrainLayer.html).
4+
5+
![](Images/HDRPFeatures-TerrainShader.png)
6+
7+
## Creating a Terrain Lit Material
8+
9+
To create a new Terrain Lit Shader Material:
10+
11+
1. Go to your Project window and right-click in the **Assets** folder
12+
2. Select **Create > Material**. This adds a new Material to your Unity Project’s Asset folder.
13+
3. Click on the Material to view it in the Inspector.
14+
4. Click on the **Shader** drop-down and select **HDRP > TerrainLit**.
15+
16+
## Using a Terrain Lit Material
17+
18+
To use a Terrain Lit Material, you must assign it to a Terrain:
19+
20+
1. View the Terrain in the Inspector and click on the cog button to go to the **Terrain Settings** section.
21+
2. Either drag and drop or use the radio button to assign your Terrain Lit Material to the **Material** property.
22+
23+
![](Images/TerrainLitShader1.png)
24+
25+
## Material properties
26+
27+
### Surface Options
28+
29+
| **Property** | **Description** |
30+
| ------------------ | ------------------------------------------------------------ |
31+
| **Receive Decals** | Enable this checkbox to allow HDRP to draw decals on this Material’s surface. |
32+
33+
### Terrain
34+
35+
| **Property** | **Description** |
36+
| ----------------------------- | ------------------------------------------------------------ |
37+
| **Enable Height-based Blend** | Specifies whether HDRP should only render the Terrain Layer with the greatest height value for a particular pixel. When enabled, HDRP takes the height values from the blue channel of the **Mask Map** Texture. When disabled, HDRP blends the Terrain Layers based on the weights painted in the control map Textures. |
38+
| **- Height Transition** | Controls how much HDRP blends the terrain if multiple Terrain Layers are approximately the same height. |
39+
| **Enable Per-pixel Normal** | Specifies whether HDRP should sample the normal map Texture on a per-pixel level. When enabled, Unity preserves more geometry details for distant terrain parts. Unity generates a geometry normal map at runtime from the heightmap, rather than the Mesh geometry. This means you can have high-resolution Mesh normals, even if your Mesh is low resolution. It only works if you enable **Draw Instanced** on the terrain. |
40+
| **Specular Occlusion Mode** | Sets the mode that HDRP uses to calculate specular occlusion. <br/>&#8226; **Off**: Disables specular occlusion.<br/>&#8226; **From Ambient Occlusion**: Calculates specular occlusion from the ambient occlusion map and the Camera's view direction. |
41+
42+
### Advanced Options
43+
44+
| **Property** | **Description** |
45+
| ------------------------- | ------------------------------------------------------------ |
46+
| **Enable GPU Instancing** | Enable this checkbox to tell HDRP to render meshes with the same geometry and Material/Shader in one batch when possible. This makes rendering faster. HDRP can not render Meshes in one batch if they have different Materials, or if the hardware does not support GPU instancing. |

com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Configuration.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,9 @@ bool IsDefaultVolumeProfileAssigned()
460460
return false;
461461

462462
var hdAsset = HDRenderPipeline.currentAsset;
463-
return hdAsset.defaultVolumeProfile != null && !hdAsset.defaultVolumeProfile.Equals(null);
463+
return hdAsset.defaultVolumeProfile != null
464+
&& !hdAsset.defaultVolumeProfile.Equals(null)
465+
&& hdAsset.defaultVolumeProfile != hdAsset.renderPipelineEditorResources.defaultSettingsVolumeProfile;
464466
}
465467
void FixDefaultVolumeProfileAssigned(bool fromAsyncUnused)
466468
{
@@ -471,7 +473,19 @@ void FixDefaultVolumeProfileAssigned(bool fromAsyncUnused)
471473
if (hdrpAsset == null)
472474
return;
473475

474-
EditorDefaultSettings.GetOrAssignDefaultVolumeProfile(hdrpAsset);
476+
VolumeProfile defaultSettingsVolumeProfileInPackage = hdrpAsset.renderPipelineEditorResources.defaultSettingsVolumeProfile;
477+
string defaultSettingsVolumeProfilePath = "Assets/" + HDProjectSettings.projectSettingsFolderPath + '/' + defaultSettingsVolumeProfileInPackage.name + ".asset";
478+
479+
//try load one if one already exist
480+
VolumeProfile defaultSettingsVolumeProfile = AssetDatabase.LoadAssetAtPath<VolumeProfile>(defaultSettingsVolumeProfilePath);
481+
if (defaultSettingsVolumeProfile == null || defaultSettingsVolumeProfile.Equals(null))
482+
{
483+
//else create it
484+
AssetDatabase.CopyAsset(AssetDatabase.GetAssetPath(defaultSettingsVolumeProfileInPackage), defaultSettingsVolumeProfilePath);
485+
defaultSettingsVolumeProfile = AssetDatabase.LoadAssetAtPath<VolumeProfile>(defaultSettingsVolumeProfilePath);
486+
}
487+
hdrpAsset.defaultVolumeProfile = defaultSettingsVolumeProfile;
488+
475489
EditorUtility.SetDirty(hdrpAsset);
476490
}
477491

com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public ConfigStyle(string label, string error, string button = resolve, MessageT
108108
error: "Default scene prefab must be set to create HD templated scene!");
109109
public static readonly ConfigStyle hdrpVolumeProfile = new ConfigStyle(
110110
label: "Default volume profile",
111-
error: "Default volume profile must be assigned in the HDRP asset!");
111+
error: "Default volume profile must be assigned in the HDRP asset! Also, for it to be editable, it should be outside of package.");
112112

113113
public static readonly ConfigStyle vrLegacyVRSystem = new ConfigStyle(
114114
label: "Legacy VR System",

0 commit comments

Comments
 (0)