From f65cd850d97d1e505526eb87a291498212968443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20V=C3=A1zquez?= Date: Mon, 24 Jan 2022 11:49:19 +0100 Subject: [PATCH 1/5] [RPW]Fix Diffusion Profile Volume Component inspector when opened with the Volume Profile --- .../Editor/Volume/VolumeComponentEditor.cs | 5 +++++ .../Editor/Lighting/DiffusionProfileOverrideEditor.cs | 9 +++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs index 87a6b6f1073..ec2540dda56 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs @@ -166,6 +166,11 @@ internal Editor inspector set => m_Inspector = value; } + /// + /// Obtains the that is being edited from this volume component + /// + protected Volume volume => inspector?.target as Volume; + List<(GUIContent displayName, int displayOrder, SerializedDataParameter param)> m_Parameters; static Dictionary s_ParameterDrawers; diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/DiffusionProfileOverrideEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/DiffusionProfileOverrideEditor.cs index 91dfb406a51..47b1eb9a702 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/DiffusionProfileOverrideEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/DiffusionProfileOverrideEditor.cs @@ -14,7 +14,6 @@ namespace UnityEditor.Rendering.HighDefinition sealed class DiffusionProfileOverrideEditor : VolumeComponentEditor { SerializedDataParameter m_DiffusionProfiles; - Volume m_Volume; DiffusionProfileSettingsListUI listUI = new DiffusionProfileSettingsListUI(); @@ -23,8 +22,6 @@ sealed class DiffusionProfileOverrideEditor : VolumeComponentEditor public override void OnEnable() { var o = new PropertyFetcher(serializedObject); - - m_Volume = (m_Inspector.target as Volume); m_DiffusionProfiles = Unpack(o.Find(x => x.diffusionProfiles)); } @@ -36,7 +33,7 @@ public override void OnInspectorGUI() // If the volume is null it means that we're editing the component from the asset // So we can't access the bounds of the volume to fill diffusion profiles used in the volume - if (m_Volume != null && !m_Volume.isGlobal) + if (volume != null && !volume.isGlobal) { if (GUILayout.Button("Fill Profile List With Scene Materials")) FillProfileListWithScene(); @@ -54,10 +51,10 @@ void DrawDiffusionProfileElement(SerializedProperty element, Rect rect, int inde void FillProfileListWithScene() { var profiles = new HashSet(); - if (m_Volume.isGlobal) + if (volume.isGlobal) return; - var volumeCollider = m_Volume.GetComponent(); + var volumeCollider = volume.GetComponent(); // Get all mesh renderers that are within the current volume var diffusionProfiles = new List(); From 934a1451f50bd6f879ee207196482f78d224dc6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20V=C3=A1zquez?= Date: Mon, 24 Jan 2022 11:55:23 +0100 Subject: [PATCH 2/5] Changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e461f68cd45..92faf05d72a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -81,6 +81,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixing missing doc API for RTAS Debug display. - Fixed AO dissapearing when DRS would be turned off through a camera, while hardware drs is active in DX12 or Vulkan (case 1383093). - Fixed misc shader warnings. +- Fixed crash opeing Volume Component with Diffusion Profile. - Fixed a shader warning in UnityInstancing.hlsl - Fixed for APV debug mode breaking rendering when switching to an asset with APV disabled. - Fixed potential asymmetrical resource release in the volumetric clouds (case 1388218). From 99cc2e3372f7e7f8aa7f46b5e592a637fc570f98 Mon Sep 17 00:00:00 2001 From: alex-vazquez <76204843+alex-vazquez@users.noreply.github.com> Date: Mon, 24 Jan 2022 15:20:59 +0100 Subject: [PATCH 3/5] Update com.unity.render-pipelines.high-definition/CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 92faf05d72a..c5c13d6a10a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -81,7 +81,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixing missing doc API for RTAS Debug display. - Fixed AO dissapearing when DRS would be turned off through a camera, while hardware drs is active in DX12 or Vulkan (case 1383093). - Fixed misc shader warnings. -- Fixed crash opeing Volume Component with Diffusion Profile. +- Fixed NullReferenceException when opeining a Volume Component with a Diffusion Profile with any inspector. - Fixed a shader warning in UnityInstancing.hlsl - Fixed for APV debug mode breaking rendering when switching to an asset with APV disabled. - Fixed potential asymmetrical resource release in the volumetric clouds (case 1388218). From 08dc0efe3843cb55b92bc955018238fbc45798cd Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Mon, 24 Jan 2022 15:37:16 +0100 Subject: [PATCH 4/5] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c5c13d6a10a..a903420f979 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -81,7 +81,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixing missing doc API for RTAS Debug display. - Fixed AO dissapearing when DRS would be turned off through a camera, while hardware drs is active in DX12 or Vulkan (case 1383093). - Fixed misc shader warnings. -- Fixed NullReferenceException when opeining a Volume Component with a Diffusion Profile with any inspector. +- Fixed NullReferenceException when opening a Volume Component with a Diffusion Profile with any inspector. - Fixed a shader warning in UnityInstancing.hlsl - Fixed for APV debug mode breaking rendering when switching to an asset with APV disabled. - Fixed potential asymmetrical resource release in the volumetric clouds (case 1388218). From 6d1e3e029ed31ed8803648f67338a105cb8a86a5 Mon Sep 17 00:00:00 2001 From: alex-vazquez <76204843+alex-vazquez@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:03:29 +0100 Subject: [PATCH 5/5] Update CHANGELOG.md --- .../CHANGELOG.md | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 3fd917bd4bd..a53c1c6d89f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -120,42 +120,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed HDRP build issues with DOTS_INSTANCING_ON shader variant. - Fixed default value of "Distortion Blur" from 1 to 0 according to the doc. - Fixed Transparent Depth Pre/Post pass by default for the built-in HDRP Hair shader graph. -- Fixed build warnings due to the exception in burst code (case 1382827). -- Fixed SpeedTree graph compatibility by removing custom interpolators. -- Fixed default value of "Distortion Blur" from 1 to 0 according to the doc. -- Fixed FOV change when enabling physical camera. -- Fixed spot light shadows near plane -- Fixed unsupported material properties show when rendering pass is Low Resolution. -- Fixed auto-exposure mismatch between sky background and scene objects in path tracing (case 1385131). -- Fixed option to force motion blur off when in XR. -- Fixed write to VT feedback in debug modes (case 1376874) -- Fixed the water system not working on metal. -- Fixed the missing debug menus to visualize the ray tracing acceleration structure (case 1371410). -- Fixed compilation issue related to shader stripping in ray tracing. -- Fixed flipped UV for directional light cookie on PBR Sky (case 1382656). -- Fixing missing doc API for RTAS Debug display. -- Fixed AO dissapearing when DRS would be turned off through a camera, while hardware drs is active in DX12 or Vulkan (case 1383093). -- Fixed misc shader warnings. - Fixed NullReferenceException when opening a Volume Component with a Diffusion Profile with any inspector. -- Fixed a shader warning in UnityInstancing.hlsl -- Fixed for APV debug mode breaking rendering when switching to an asset with APV disabled. -- Fixed potential asymmetrical resource release in the volumetric clouds (case 1388218). -- Fixed the fade in mode of the clouds not impacting the volumetric clouds shadows (case 1381652). -- Fixed the rt screen space shadows not using the correct asset for allocating the history buffers. -- Fixed the intensity of the sky being reduced signficantly even if there is no clouds (case 1388279). -- Fixed a crash with render graph viewer when render graph is not provided with an execution name. -- Fixed rendering in the editor when an incompatible API is added (case 1384634). -- Fixed issue with typed loads on RGBA16F in Volumetric Lighting Filtering. -- Fixed Tile/Cluster Debug in the Rendering Debugger for Decal and Local Volumetric Fog -- Fixed timeline not updating PBR HDAdditionalLightData parameters properly. -- Fixed NeedMotionVectorForTransparent checking the wrong flag. -- Fixed debug probe visualization affecting screen space effects. -- Fixed issue of index for APV running out space way before it should. -- Fixed issue during reloading scenes in a set when one of the scenes has been renamed. -- Fixed Local Volumetric Fog tooltips. -- Fixed issue with automatic RendererList culling option getting ignored (case 1388854). -- Fixed an issue where APV cells were not populated properly when probe volumes have rotations -- Fixed issue where changes to APV baking set lists were not saved. ### Changed - Converted most TGA textures files to TIF to reduce the size of HDRP material samples.