From 392060b806c69aeecca95f26a105d4dbf45d5637 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Tue, 2 Feb 2021 16:31:24 +0100 Subject: [PATCH 1/2] Fix --- .../AmbientOcclusion.RenderGraph.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs index c9e2a503812..7250f39734e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs @@ -46,6 +46,7 @@ public TextureHandle Render(RenderGraph renderGraph, HDCamera hdCamera, TextureH var packedData = RenderAO(renderGraph, aoParameters, depthPyramid, normalBuffer); result = DenoiseAO(renderGraph, aoParameters, depthPyramid, motionVectors, packedData, currentHistory, outputHistory); + result = UpsampleAO(renderGraph, aoParameters, result, depthPyramid); } } } @@ -107,6 +108,9 @@ TextureHandle DenoiseAO(RenderGraph renderGraph, TextureHandle currentHistory, TextureHandle outputHistory) { + if (!parameters.temporalAccumulation && !parameters.fullResolution) + return aoPackedData; + TextureHandle denoiseOutput; using (var builder = renderGraph.AddRenderPass("Denoise GTAO", out var passData)) @@ -147,11 +151,8 @@ TextureHandle DenoiseAO(RenderGraph renderGraph, ctx.cmd); }); - if (parameters.fullResolution) - return passData.denoiseOutput; + return passData.denoiseOutput; } - - return UpsampleAO(renderGraph, parameters, denoiseOutput, depthTexture); } class UpsampleAOPassData @@ -164,6 +165,9 @@ class UpsampleAOPassData TextureHandle UpsampleAO(RenderGraph renderGraph, in RenderAOParameters parameters, TextureHandle input, TextureHandle depthTexture) { + if (parameters.fullResolution) + return input; + using (var builder = renderGraph.AddRenderPass("Upsample GTAO", out var passData, ProfilingSampler.Get(HDProfileId.UpSampleSSAO))) { builder.EnableAsyncCompute(parameters.runAsync); From 2aee37027559d6494e21affd35639dbe518bcd16 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Tue, 2 Feb 2021 16:32:06 +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 42c549e7e0a..6efc48f68db 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed an exception when opening the color picker in the material UI (case 1307143). - Fixed lights shadow frustum near and far planes. +- Fixed various issues with non-temporal SSAO and rendergraph. ### Changed - Removed the material pass probe volumes evaluation mode.