Skip to content

Commit

Permalink
[7.x.x] Merge hd/staging [Skip CI] (#1147)
Browse files Browse the repository at this point in the history
* [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 <remi.chapelain@unity3d.com>

* Fixed an usage of a a compute buffer not bound (1229964) (#28)

Co-authored-by: Anis <anis@unity3d.com>

* 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 <sebastien@unity3d.com>

* [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 <sebastien@unity3d.com>

* 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 <sebastien@unity3d.com>

* Fixed a performance issue with stochastic ray traced area shadows. (#306)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [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 <sebastien@unity3d.com>

* [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 <sebastien@unity3d.com>

* [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 <sebastien@unity3d.com>

* 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 <sebastien@unity3d.com>

* 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

* [Backport 7.x.x] Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. (#988)

* Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time.

* Update changelog

* [Backport 7.x.x] Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. (#990)

* Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once.

# Conflicts:
#	com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs

* Update changelog

* [Backport 7.x.x] Add defines guards around shadows hlsl files (#1091)

* Add guards to shadow includes

# Conflicts:
#	com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl

* changelog

* [Backport 7.x.x]  Fix issue with light layers > 7 in the deferred path (#1093)

* Mask layers to consider only the supported 8 bits

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 7.x.x] Fix decal being duplicated in prefab isolation mode.  (#1103)

* Fixed decals being duplicated in prefab isolation mode.

* Fix decals in the player.

* Update changelog

* Revert "[Backport 7.x.x] Fix decal being duplicated in prefab isolation mode.  (#1103)"

This reverts commit 5e5ecd9.

* Update CHANGELOG.md

* Hdrp/docs/volumetric lighting format fix (#628)

* Updated volumetric lighting and subsurface scattering docs

* Update Override-Diffusion-Profile.md

* Adds mention of fidelityfx-cas as requested by AMD (#629)

* Update Light-Component.md (#682)

* Fix transparent movec scene view #698

* Update HDRP-Camera.md (#706)

* Update Reflection-Probe (#790)

* Update Reflection-Probe.md

* Update Reflection-Probe.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix reflection probe framesettings override #796

* Workaround for GetKernelThreadGroupSizes returning wrong data #760

* Sanitize transparent motion vectors setting #761

* Fix issue with blocky artifacts when decals affecting metallic are applied on specular color workflow #823

* Force post process parent setting to be before child settings #799

* Fixed logic of test on presence of HDRP asset that would wrongly trigger (#824)

a warning message when not in batch mode.

* Fix warning in HDAdditionalLightData OnValidate #885

* Revert "Fix warning in HDAdditionalLightData OnValidate #885"

This reverts commit 1798e28.

* Fix warning in HDAdditionalLightData OnValidate #885

* Fix warning in HDAdditionalLightData OnValidate #885 - fix merge issue

* Editing volumes via script doc (#884)

* Added Volumes API doc

* Update Volumes-API.md

* Changed terminology back to Volume Override

* Added terminology disclaimer

* Fix message for metal and ao (#859)

* Update HDR information. Also updated format and links. (#853)

* Fix issue with the blue line of prefab modifications for Volume mode #860

* Recompute FOV when generating PixelCoord To WorldSpace View Direction Matrix #865

* Rename h to hlsl

* Change extensions of CAS includes from h to hlsl #961

* Fix SSAO with double sided material and normal mode to none #1043

* fix typo in the Render Pipeline Wizard #1037

* Fix emissive mesh layer mask behaviour #1062

* Fix for area light baked data not updating when changing the gizmo #1075

* Fixed an error when switch area light shape to disk while an emissive… #1112

* Have the PBR Sky not render black when below horizon #1116

* Fix area light gizmo not updating engine side light v2 #1156

* Fix XR single-pass macros in tessellation shaders #1160

* Update Override-Micro-Shadows.md (#1236)

* Added disclaimer to volumes (#1247)

* Fix XR Display providers not getting zNear and zFar updated on them. #1269

* Moved requirements in toc to make it consistent with URP/VFX #1352

* Docs quality fixes #1445

* Added enable Volume snippet #1477

* Update Volume-Override-Enable-Override.md

* Porting console fixes to staging (#699)

* Fix some NaNs issues on consoles - fix

* [7.x.x Backport] Fix exposure white flash when enabling SSR (#845)

* inform postprocess

* Changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [7.x.x Backport] Fix depth pyramid issues with dynamic resolution  (#849)

* Port

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 7.x.x] Fixed Look Dev with Light Theme (#1101)

* Fixed an issue where opening the look dev window with the light theme would make the window blink and eventually crash unity.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 7.x.x] Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change. (#1104)

* Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change.

* Fixed issue when using Custom

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Backport 7.x.x] Fixed an issue where look dev lighting would go black when a new scene is loaded. (#1321)

* Fixed an issue where look dev lighting would go black when a new scene is loaded.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: Remi Chapelain <remi.chapelain@unity3d.com>
Co-authored-by: Anis <anis@unity3d.com>
Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: JordanL8 <lewis.jordan@hotmail.co.uk>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: slunity <37302815+slunity@users.noreply.github.com>
Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: Remi Slysz <40034005+RSlysz@users.noreply.github.com>
Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com>
Co-authored-by: victor <victor.ceitelis@unity3d.com>
Co-authored-by: fredericv-unity3d <55485372+fredericv-unity3d@users.noreply.github.com>
Co-authored-by: Aras Pranckevičius <aras@unity3d.com>
Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org>
Co-authored-by: skhiat <55133890+skhiat@users.noreply.github.com>
Co-authored-by: FrancescoC-Unity <francescoc@unity3d.com>
Co-authored-by: robinb-u3d <robinb-u3d@users.noreply.github.com>
  • Loading branch information
20 people committed Aug 4, 2020
1 parent 7769805 commit 9ef3a11
Show file tree
Hide file tree
Showing 86 changed files with 500 additions and 254 deletions.
28 changes: 15 additions & 13 deletions com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs
Expand Up @@ -42,7 +42,7 @@ public interface IViewDisplayer
/// <summary>Callback on update requested</summary>
event Action OnUpdateRequested;
}

partial class DisplayWindow : EditorWindow, IViewDisplayer
{
static partial class Style
Expand Down Expand Up @@ -82,7 +82,7 @@ static partial class Style
internal const string k_CameraMenuSync1On2 = "Align Camera 1 with Camera 2";
internal const string k_CameraMenuSync2On1 = "Align Camera 2 with Camera 1";
internal const string k_CameraMenuReset = "Reset Cameras";

internal const string k_EnvironmentSidePanelName = "Environment";
internal const string k_DebugSidePanelName = "Debug";

Expand Down Expand Up @@ -127,7 +127,7 @@ static partial class Style
Label m_NoEnvironment2;

Image[] m_Views = new Image[2];

LayoutContext layout
=> LookDev.currentContext.layout;

Expand All @@ -143,7 +143,7 @@ Layout viewLayout
}
}
}

SidePanel sidePanel
{
get => layout.showedSidePanel;
Expand Down Expand Up @@ -218,7 +218,7 @@ SidePanel sidePanel

void OnEnable()
{
//Stylesheet
//Stylesheet
// Try to load stylesheet. Timing can be odd while upgrading packages (case 1219692).
// In this case, it will be fixed in OnGUI. Though it can spawn error while reimporting assets.
// Waiting for filter on stylesheet (case 1228706) to remove last error.
Expand Down Expand Up @@ -486,7 +486,7 @@ Rect IViewDisplayer.GetRect(ViewCompositionIndex index)
throw new ArgumentException("Unknown ViewCompositionIndex: " + index);
}
}

Vector2 m_LastFirstViewSize = new Vector2();
Vector2 m_LastSecondViewSize = new Vector2();
void IViewDisplayer.SetTexture(ViewCompositionIndex index, Texture texture)
Expand Down Expand Up @@ -532,7 +532,7 @@ void IViewDisplayer.SetTexture(ViewCompositionIndex index, Texture texture)
throw new ArgumentException("Unknown ViewCompositionIndex: " + index);
}
}

void IViewDisplayer.Repaint() => Repaint();

void ApplyLayout(Layout value)
Expand Down Expand Up @@ -627,19 +627,21 @@ IStyle GetEnvironmentContenairDraggerStyle()

void OnGUI()
{
//Stylesheet
//Stylesheet
// [case 1219692] if LookDev is open while reimporting CoreRP package,
// stylesheet can be null. In this case, we can have a null stylesheet
// registered as it got destroyed. Reloading it. As we cannot just
// registered as it got destroyed. Reloading it. As we cannot just
// remove a null entry, we must filter and reconstruct the while list.
if (styleSheet == null || styleSheet.Equals(null)
|| (!EditorGUIUtility.isProSkin && (styleSheetLight == null || styleSheetLight.Equals(null))))
{
// While (case 1228706) is still on going, we sill close and reopen the look dev.
// This will prevent spawning error at frame.
LookDev.Close();
LookDev.Open();
return;
// Note 2: This actually causes the lookdev to break completely with light theme.
// Until the actual issue is fixed, we'll comment this fix out as it only concerns an upgrade problem.
//LookDev.Close();
//LookDev.Open();
//return;

// Following lines is the correct fix if UIElement filter garbage collected Stylesheet.

Expand Down Expand Up @@ -689,7 +691,7 @@ void OnGUI()
}

// [case 1245086] Guard in case the SRP asset is set to null (or to a not supported SRP) when the lookdev window is already open
// Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check.
// Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check.
if (!LookDev.supported && OnUpdateRequestedInternal !=null)
{
// Print an error and close the Lookdev window (to avoid spamming the console)
Expand Down
Expand Up @@ -30,7 +30,6 @@ public void Dispose()
return;
disposed = true;

stage?.Dispose();
stage = null;
updater = null;
output?.Release();
Expand Down
8 changes: 7 additions & 1 deletion com.unity.render-pipelines.core/Editor/LookDev/Stage.cs
Expand Up @@ -196,7 +196,7 @@ static void InitAddedObjectsRecursively(GameObject go)
var lineRenderer = go.GetComponent<LineRenderer>();
if (lineRenderer != null)
lineRenderer.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.Off;

var volumes = go.GetComponents<UnityEngine.Rendering.Volume>();
foreach (var volume in volumes)
volume.UpdateLayer(); //force update of layer now as the Update can be called after we unregister volume from manager
Expand Down Expand Up @@ -273,6 +273,7 @@ class StageCache : IDisposable

Stage[] m_Stages;
Context m_Contexts;
IDataProvider m_CurrentDataProvider;

public Stage this[ViewIndex index]
=> m_Stages[(int)index];
Expand Down Expand Up @@ -310,6 +311,8 @@ Stage InitStage(ViewIndex index, IDataProvider dataProvider)
}

dataProvider.FirstInitScene(stage.runtimeInterface);

m_CurrentDataProvider = dataProvider;
return stage;
}

Expand Down Expand Up @@ -345,7 +348,10 @@ void CleanUp()
if (!disposedValue)
{
foreach (Stage stage in m_Stages)
{
m_CurrentDataProvider.Cleanup(stage.runtimeInterface);
stage.Dispose();
}

disposedValue = true;
}
Expand Down
Expand Up @@ -199,10 +199,10 @@ public void OnGUI()

// Even if the asset is not dirty, the list of component may have been changed by another inspector.
// In this case, only the hash will tell us that we need to refresh.
if (asset.isDirty || asset.GetHashCode() != m_CurrentHashCode)
if (asset.isDirty || asset.GetComponentListHashCode() != m_CurrentHashCode)
{
RefreshEditors();
m_CurrentHashCode = asset.GetHashCode();
m_CurrentHashCode = asset.GetComponentListHashCode();
asset.isDirty = false;
}

Expand Down
Expand Up @@ -59,7 +59,7 @@ public override void OnInspectorGUI()
EditorGUI.BeginProperty(lineRect, label, m_IsGlobal);
{
EditorGUI.BeginChangeCheck();
isGlobal = EditorGUILayout.Popup(label, isGlobal, m_Modes);
isGlobal = EditorGUI.Popup(lineRect, label, isGlobal, m_Modes);
if (EditorGUI.EndChangeCheck())
m_IsGlobal.boolValue = isGlobal == 0;
}
Expand Down
Expand Up @@ -46,6 +46,12 @@ public interface IDataProvider
/// </summary>
/// <param name="stage">Access element of the LookDev's scene</param>
void OnEndRendering(StageRuntimeInterface stage);

/// <summary>
/// Callback called to do any necessary cleanup.
/// </summary>
/// <param name="SRI">Access element of the LookDev's scene</param>
void Cleanup(StageRuntimeInterface SRI);
}

/// <summary>
Expand Down
13 changes: 13 additions & 0 deletions com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs
Expand Up @@ -297,5 +297,18 @@ public override int GetHashCode()
return hash;
}
}

internal int GetComponentListHashCode()
{
unchecked
{
int hash = 17;

for (int i = 0; i < components.Count; i++)
hash = hash * 23 + components[i].GetType().GetHashCode();

return hash;
}
}
}
}
@@ -1,3 +1,5 @@
#ifndef SHADOW_SAMPLING_TENT_INCLUDED
#define SHADOW_SAMPLING_TENT_INCLUDED
// ------------------------------------------------------------------
// PCF Filtering Tent Functions
// ------------------------------------------------------------------
Expand Down Expand Up @@ -242,3 +244,4 @@ void SampleShadow_ComputeSamples_Tent_7x7(real4 shadowMapTexture_TexelSize, real
fetchesWeights[14] = fetchesWeightsU.z * fetchesWeightsV.w;
fetchesWeights[15] = fetchesWeightsU.w * fetchesWeightsV.w;
}
#endif
30 changes: 29 additions & 1 deletion com.unity.render-pipelines.high-definition/CHANGELOG.md
@@ -1,4 +1,4 @@
# Changelog
# Changelog
All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -8,6 +8,34 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- Fixed a bug where connections to the `Normal` slot on *Stack Lit Master* node would be lost when changing normal space.
- Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time.
- Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once.
- Fixed missing include guards in shadow hlsl files.
- Fixed issue with light layers bigger than 8 (and above the supported range).
- Fixed issues with scene view and transparent motion vectors.
- Fix reflection probe frame settings override
- Workaround an issue caused by GetKernelThreadGroupSizes failing to retrieve correct group size.
- Fixed transparent motion vector framesetting not sanitized.
- Fix issue causing blocky artifacts when decals affect metallic and are applied on material with specular color workflow.
- Fixed wrong order of post process frame settings.
- Fixed warning in HDAdditionalLightData OnValidate (cases 1250864, 1244578)
- Fixed issue with blue line in prefabs for volume mode.
- Fix issue that caused sky to incorrectly render when using a custom projection matrix.
- Fixed issue with completely black AO on double sided materials when normal mode is set to None.
- Fixed issue with culling layer mask of area light's emissive mesh
- Fixed for area light not updating baked light result when modifying with gizmo.
- Fixed errors when switching area light to disk shape while an area emissive mesh was displayed.
- PBR Sky now doesn't go black when going below sea level, but it instead freezes calculation as if on the horizon.
- Fixed XR single-pass macros in tessellation shaders.
- Fixed XR Display providers not getting zNear and zFar plane distances passed to them when in HDRP.
- Fixed issue with white flash when enabling SSR.
- Fixed issue with depth pyramid generation and dynamic resolution.
- Fixed an issue where opening the look dev window with the light theme would make the window blink and eventually crash unity.
- Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change.
- Fixed an issue where look dev lighting would go black when a new scene is loaded.

### Changed
- Changed extensions of shader CAS include files.

## [7.4.1] - 2020-06-03

Expand Down
@@ -1,8 +1,13 @@
# Diffusion Profile

The High Definition Render Pipeline (HDRP) stores most [subsurface scattering](Subsurface-Scattering.html) settings in a __Diffusion Profile__ Asset. You can assign a __Diffusion Profile__ Asset directly to Materials that use Subsurface Scattering.
The High Definition Render Pipeline (HDRP) stores most [subsurface scattering](Subsurface-Scattering.md) settings in a __Diffusion Profile__ Asset. You can assign a __Diffusion Profile__ Asset directly to Materials that use Subsurface Scattering.

To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffusion Profile__. To use it, open your HDRP Asset and add it to the __Diffusion Profile List__ property.
To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffusion Profile__.

* To use it by default, open your HDRP Asset and, in the **Material** section, add it to the __Diffusion Profile List__.
* To use it in a particular [Volume](Volumes.md), select a Volume with a [Diffusion Profile Override](Override-Diffusion-Profile.md) and add it to the **Diffusion Profile List** .

## Properties

| Property| Description |
|:---|:---|
Expand All @@ -14,15 +19,15 @@ To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffu



## Subsurface Scattering only
### Subsurface Scattering only

| Property| Description |
|:---|:---|
| **Texturing Mode** | Use the drop-down to select when HDRP applies the albedo of the Material.<br />&#8226; **Post-Scatter**: HDRP applies the albedo to the Material after the subsurface scattering pass pass. This means that the contents of the albedo texture are not blurred. Use this mode for scanned data and photographs that already contain some blur due to subsurface scattering. <br />&#8226; **Pre- and Post-Scatter**: Albedo is partially applied twice, before and after the subsurface scattering pass pass. Effectively, this blurs the albedo, resulting in a softer, more natural look. |



## Transmission only
### Transmission only

| Property| Description |
|:---|:---|
Expand All @@ -33,7 +38,7 @@ To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffu



## Profile Previews
### Profile Previews

| Property| Description |
|:---|:---|
Expand Down
@@ -1,16 +1,21 @@
# Dynamic resolution

Dynamic resolution reduces the workload on the GPU, which helps maintain a stable target frame rate. The High Definition Render Pipeline (HDRP) uses dynamic resolution to lower the resolution of the render targets that the main rendering passes use. HDRP will use hardware dynamic resolution when supported by the platform, otherwise it will use a software version.
Dynamic resolution reduces the workload on the GPU, which helps maintain a stable target frame rate. The High Definition Render Pipeline (HDRP) uses dynamic resolution to lower the resolution of the render targets that the main rendering passes use. To do this, HDRP uses hardware dynamic resolution, if the platform supports it, otherwise it uses a software version. The main difference is that, for hardware dynamic resolution, the hardware treats the render targets up until the back buffer as being of the scaled size. This means that is is faster to clear the render targets.

To use dynamic resolution in your Project, you must enable dynamic resolution in your [HDRP Asset)(HDRP-Asset.html). In the Inspector for your HDRP Asset, navigate to **Rendering** **> Dynamic Resolution** and enable the **Enable** checkbox. For information on how to customize the rest of the HDRP Asset’s global dynamic resolution properties, see the dynamic resolution section of the [HDRP Asset documentation](HDRP-Asset.html#DynamicResolution).
Moreover, each camera that needs to perform dynamic resolution needs to have the checkbox **General > Allow Dynamic Resolution** set on the camera component.

When you enable dynamic resolution, HDRP allocates render targets to accommodate the maximum resolution possible. Then, HDRP rescales the viewport accordingly, so it can render at varying resolutions. At the end of each frame, HDRP upscales the result of the scaled rendering to match the back buffer resolution. To do this, HDRP uses the method defined in the **Upscale Filter**.
When you enable dynamic resolution, HDRP allocates render targets to accommodate the maximum resolution possible. Then, HDRP rescales the viewport accordingly, so it can render at varying resolutions. At the end of each frame, HDRP upscales the result of the scaled rendering to match the back buffer resolution. Regardless of which method HDRP uses to process dynamic resolution, either hardware or software, it still uses a software method to upscale the result. The method HDRP uses is defined in the **Upscale Filter**.

![](Images/DynamicResolution1.png)

## Using dynamic resolution

To use dynamic resolution in your Project, you must enable dynamic resolution in your [HDRP Asset](HDRP-Asset.md) and then enable it for each [Camera](HDRP-Camera.md) you want to use it with. To do this:

1. In the Inspector for your HDRP Asset, go to **Rendering** **> Dynamic Resolution** and enable the **Enable** checkbox. For information on how to customize the rest of the HDRP Asset’s global dynamic resolution properties, see the dynamic resolution section of the [HDRP Asset documentation](HDRP-Asset.md#DynamicResolution).
2. For every [Camera](HDRP-Camera.md) you want to perform dynamic resolution, go to the **General** section and enable **Allow Dynamic Resolution**.

Dynamic resolution is not automatic, so you need to manually call the `DynamicResolutionHandler.SetDynamicResScaler(PerformDynamicRes scaler, DynamicResScalePolicyType scalerType)` function.

The policy type can be one of the following:
Expand Down

0 comments on commit 9ef3a11

Please sign in to comment.