From 2df68aa6e593d1cc8d6de5514a7d0978eb388049 Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Wed, 14 Oct 2020 00:51:16 +0200 Subject: [PATCH 1/4] Deactivate other forms of FSAA when path tracing is on. --- .../Runtime/PostProcessing/PostProcessSystem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index ed03ad9ab08..957da59a98a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -92,6 +92,7 @@ private enum SMAAStage ShadowsMidtonesHighlights m_ShadowsMidtonesHighlights; ColorCurves m_Curves; FilmGrain m_FilmGrain; + PathTracing m_PathTracing; // Prefetched frame settings (updated on every frame) bool m_ExposureControlFS; @@ -367,6 +368,7 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn m_ShadowsMidtonesHighlights = stack.GetComponent(); m_Curves = stack.GetComponent(); m_FilmGrain = stack.GetComponent(); + m_PathTracing = stack.GetComponent(); // Prefetch frame settings - these aren't free to pull so we want to do it only once // per frame @@ -386,6 +388,9 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn m_DitheringFS = frameSettings.IsEnabled(FrameSettingsField.Dithering); m_AntialiasingFS = frameSettings.IsEnabled(FrameSettingsField.Antialiasing); + // Override full screen anti-aliasing when doing path tracing (which is naturally anti-aliased already) + m_AntialiasingFS &= !m_PathTracing.enable.value; + m_DebugExposureCompensation = m_HDInstance.m_CurrentDebugDisplaySettings.data.lightingDebugSettings.debugExposure; CheckRenderTexturesValidity(); @@ -584,7 +589,7 @@ void PoolSource(ref RTHandle src, RTHandle dst) // If Path tracing is enabled, then DoF is computed in the path tracer by sampling the lens aperure (when using the physical camera mode) bool isDoFPathTraced = (camera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && - camera.volumeStack.GetComponent().enable.value && + m_PathTracing.enable.value && camera.camera.cameraType != CameraType.Preview && m_DepthOfField.focusMode == DepthOfFieldMode.UsePhysicalCamera); From 2836b1d7cc1031b1051b256e23a231b8c9ba1a41 Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Wed, 14 Oct 2020 00:55:58 +0200 Subject: [PATCH 2/4] Updated changelog. --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 5dd2f53f4b0..5495c830cf6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +hangelog All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) @@ -197,6 +197,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - added SV_PrimitiveID in the VaryingMesh structure for fulldebugscreenpass as well as primitiveID in FragInputs - Changed which local frame is used for multi-bounce RTReflections. - Move System Generated Values semantics out of VaryingsMesh structure. +- Other forms of FSAA are silently deactivated, when path tracing is on. ## [10.0.0] - 2019-06-10 From ef908fa6bb3813156856619a93bfee96100e3282 Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Wed, 14 Oct 2020 01:02:02 +0200 Subject: [PATCH 3/4] Fixed issue with changelog title (not sure when it came from). --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 5495c830cf6..a6a90b5a7aa 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -1,4 +1,4 @@ -hangelog +# Changelog All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) From bb78c19a29c5306a7fadfc5b3ff89e4622ef9a9c Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Wed, 14 Oct 2020 01:03:27 +0200 Subject: [PATCH 4/4] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a6a90b5a7aa..4f44be46ea2 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +# Changelog All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)