From b2c5700e613caec24a319258a97c0b63bb346757 Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Fri, 16 Oct 2020 18:02:21 +0200 Subject: [PATCH] Fix TAA with no motion vectors --- .../Runtime/RenderGraph/RenderGraphBuilder.cs | 2 +- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs index abfee5cd9d6..4ede88f9718 100644 --- a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs +++ b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs @@ -227,7 +227,7 @@ void CheckTransientResource(in ResourceHandle res) if (transientIndex != -1 && transientIndex != m_RenderPass.index) { - throw new ArgumentException($"Trying to use a transient texture (pass index {transientIndex}) in a different pass (pass index {m_RenderPass.index}."); + throw new ArgumentException($"Trying to use a transient texture (pass index {transientIndex}) in a different pass (pass index {m_RenderPass.index})."); } } #endif diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e4f142d1b14..775f9415806 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -166,6 +166,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed null reference in the Undo callback of the graphics compositor - Fixed cullmode for SceneSelectionPass. - Fixed issue that caused non-static object to not render at times in OnEnable reflection probes. +- Fixed issue with TAA and no motion vectors. ### Changed - Preparation pass for RTSSShadows to be supported by render graph. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs index 666c47ae707..7c891633ebd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs @@ -50,6 +50,7 @@ TextureHandle RenderPostProcess( RenderGraph renderGraph, } } + var motionVectors = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors) ? prepassOutput.resolvedMotionVectorsBuffer : renderGraph.defaultResources.blackTextureXR; m_PostProcessSystem.Render( renderGraph, parameters.hdCamera, @@ -59,7 +60,7 @@ TextureHandle RenderPostProcess( RenderGraph renderGraph, prepassOutput.resolvedDepthBuffer, prepassOutput.depthPyramidTexture, prepassOutput.resolvedNormalBuffer, - prepassOutput.resolvedMotionVectorsBuffer, + motionVectors, dest, parameters.flipYInPostProcess );