From 76cda7599d928599d295895357a652534a2ce0e0 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 11 Jun 2020 12:07:34 +0200 Subject: [PATCH 1/2] Port --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 1 + .../Runtime/RenderPipeline/Utility/HDUtils.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index b7678a90b1b..78c2a83f16f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4005,6 +4005,7 @@ void GenerateDepthPyramid(HDCamera hdCamera, CommandBuffer cmd, FullScreenDebugM { CopyDepthBufferIfNeeded(hdCamera, cmd); + m_SharedRTManager.GetDepthBufferMipChainInfo().ComputePackedMipChainInfo(new Vector2Int(hdCamera.actualWidth, hdCamera.actualHeight)); int mipCount = m_SharedRTManager.GetDepthBufferMipChainInfo().mipLevelCount; using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DepthPyramid))) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs index 0560b4eaebb..f9bf6dbbc29 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs @@ -508,6 +508,10 @@ public void Allocate() // This function is NOT fast, but it is illustrative, and can be optimized later. public void ComputePackedMipChainInfo(Vector2Int viewportSize) { + // No work needed. + if (viewportSize == mipLevelSizes[0]) + return; + textureSize = viewportSize; mipLevelSizes[0] = viewportSize; mipLevelOffsets[0] = Vector2Int.zero; From f9e3d356500e8128b40311075b372fd276825107 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 11 Jun 2020 12:08:04 +0200 Subject: [PATCH 2/2] 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 ea826f2f878..81ddae1cc9d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed depth prepass and postpass being disabled after changing the shader in the material UI. - Fix an issue in reading the gbuffer for ray traced subsurface scattering (case 1248358). - Fixed an issue where editing the Look Dev default profile would not reflect directly in the Look Dev window. +- Fixed issue with depth pyramid generation and dynamic resolution. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings