diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 283ec65c174..d1826d9112c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed for area light not updating baked light result when modifying with gizmo. - Fixed issue with white flash when enabling SSR. - Fix inconsistencies with transparent motion vectors and opaque by allowing camera only transparent motion vectors. +- Fixed issue with depth pyramid generation and dynamic resolution. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings 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 f2622bfb2ea..e62b8f9ec46 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4047,6 +4047,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 e47e1c84cc7..d4e871d8411 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;