diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 4980a7900a7..6ff40a07cad 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -168,6 +168,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where runtime debug window UI would leak game objects. - Fixed NaNs when denoising pixels where the dot product between normal and view direction is near zero (case 1329624). - Fixed ray traced reflections that were too dark for unlit materials. Reflections are now more consistent with the material emissiveness. +- Fixed pyramid color being incorrect when hardware dynamic resolution is enabled. ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs index 4c38acc9baa..37b1e975ffd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs @@ -165,8 +165,13 @@ public int RenderColorGaussianPyramid(CommandBuffer cmd, Vector2Int size, Textur cmd.ClearRenderTarget(false, true, Color.black); } - float sourceScaleX = (float)size.x / source.width; - float sourceScaleY = (float)size.y / source.height; + bool isHardwareDrsOn = DynamicResolutionHandler.instance.HardwareDynamicResIsEnabled(); + var hardwareTextureSize = new Vector2Int(source.width, source.height); + if (isHardwareDrsOn) + hardwareTextureSize = DynamicResolutionHandler.instance.ApplyScalesOnSize(hardwareTextureSize); + + float sourceScaleX = (float)size.x / (float)hardwareTextureSize.x; + float sourceScaleY = (float)size.y / (float)hardwareTextureSize.y; // Copies src mip0 to dst mip0 m_PropertyBlock.SetTexture(HDShaderIDs._BlitTexture, source);