From 26a7f5b17fe2831aea2070ec05f4c9147b4ee015 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 11 Feb 2021 13:56:12 +0100 Subject: [PATCH 1/2] Push stuff for debug --- .../PostProcessing/PostProcessSystem.RenderGraph.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs index 52848d3862b..27b6d8c191c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs @@ -504,8 +504,8 @@ TextureHandle DepthOfFieldPass(RenderGraph renderGraph, HDCamera hdCamera, Textu passData.farCoC = TextureHandle.nullHandle; } - passData.fullresCoC = builder.CreateTransientTexture(new TextureDesc(Vector2.one, true, true) - { colorFormat = k_CoCFormat, enableRandomWrite = true, name = "Full res CoC" }); + passData.fullresCoC = builder.ReadWriteTexture(renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true) + { colorFormat = k_CoCFormat, enableRandomWrite = true, name = "Full res CoC" })); GetDoFResolutionScale(passData.parameters, out float unused, out float resolutionScale); float actualNearMaxBlur = passData.parameters.nearMaxBlur * resolutionScale; @@ -557,11 +557,13 @@ TextureHandle DepthOfFieldPass(RenderGraph renderGraph, HDCamera hdCamera, Textu }); source = passData.destination; + + m_HDInstance.PushFullScreenDebugTexture(renderGraph, passData.fullresCoC, FullScreenDebugMode.DepthOfFieldCoc); } else { - passData.fullresCoC = builder.CreateTransientTexture(new TextureDesc(Vector2.one, true, true) - { colorFormat = k_CoCFormat, enableRandomWrite = true, useMipMap = true, name = "Full res CoC" }); + passData.fullresCoC = builder.ReadWriteTexture(renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true) + { colorFormat = k_CoCFormat, enableRandomWrite = true, useMipMap = true, name = "Full res CoC" })); passData.pingFarRGB = builder.CreateTransientTexture(new TextureDesc(Vector2.one, true, true) { colorFormat = m_ColorFormat, useMipMap = true, enableRandomWrite = true, name = "DoF Source Pyramid" }); @@ -573,6 +575,7 @@ TextureHandle DepthOfFieldPass(RenderGraph renderGraph, HDCamera hdCamera, Textu }); source = passData.destination; + m_HDInstance.PushFullScreenDebugTexture(renderGraph, passData.fullresCoC, FullScreenDebugMode.DepthOfFieldCoc); } } } From 3b294a70e8dac173abcedd3024d9bb4ff0920ad4 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 11 Feb 2021 13:58:12 +0100 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 f9aae1dac59..cbdaf1c81f6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed skybox for ortho cameras. - Fixed model import by adding additional data if needed. - Fix screen being over-exposed when changing very different skies. +- Fix issue with Depth of Field CoC debug view. ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard