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. 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);