diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 43efd0913d4..8fbd6e41dfc 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed GC allocations from XR occlusion mesh when using multipass. +- Fixed XR depth copy when using MSAA. ## [11.0.0] - 2020-10-21 diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index 9da56017ace..969f7662021 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -91,7 +91,14 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, // lightCluster.EvaluateClusterDebugView(cmd, hdCamera); //} - colorBuffer = RenderPathTracing(m_RenderGraph, hdCamera); + if (hdCamera.viewCount == 1) + { + colorBuffer = RenderPathTracing(m_RenderGraph, hdCamera); + } + else + { + Debug.LogWarning("Path Tracing is not supported with XR single-pass rendering."); + } } else { @@ -270,7 +277,7 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, RenderCustomPass(m_RenderGraph, hdCamera, postProcessDest, prepassOutput, customPassCullingResults, cullingResults, CustomPassInjectionPoint.AfterPostProcess, aovRequest, aovCustomPassBuffers); - CopyXRDepth(m_RenderGraph, hdCamera, prepassOutput.depthBuffer, backBuffer); + CopyXRDepth(m_RenderGraph, hdCamera, prepassOutput.resolvedDepthBuffer, backBuffer); // In developer build, we always render post process in an intermediate buffer at (0,0) in which we will then render debug. // Because of this, we need another blit here to the final render target at the right viewport. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs index 71beea1e8b1..4e6df80af1f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs @@ -135,7 +135,7 @@ class RenderOcclusionMeshesPassData void RenderXROcclusionMeshes(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colorBuffer, TextureHandle depthBuffer) { - if (hdCamera.xr.enabled && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) + if (hdCamera.xr.hasValidOcclusionMesh && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) { using (var builder = renderGraph.AddRenderPass("XR Occlusion Meshes", out var passData)) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs index 03710ddf95e..f91dc01b4e4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs @@ -334,12 +334,6 @@ TextureHandle RenderPathTracing(RenderGraph renderGraph, HDCamera hdCamera) if (!pathTracingShader || !m_PathTracingSettings.enable.value) return TextureHandle.nullHandle; - if (hdCamera.viewCount > 1) - { - Debug.LogError("Path Tracing is not supported when using XR single-pass rendering."); - return TextureHandle.nullHandle; - } - CheckDirtiness(hdCamera); var parameters = PreparePathTracingParameters(hdCamera);