diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index f83cd64187a..5add04cf7ec 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed lights shadow frustum near and far planes. - Fixed various issues with non-temporal SSAO and rendergraph. - Fix screen being over-exposed when changing very different skies. +- White flashes on camera cuts on volumetric fog. ### Changed - Removed the material pass probe volumes evaluation mode. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index f8ab5ebeb03..4f39b97a5d8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -83,6 +83,8 @@ public struct ViewConstants /// Volumetric history buffer state. public bool volumetricHistoryIsValid = false; + internal int volumetricValidFrames = 0; + /// Width actually used for rendering after dynamic resolution and XR is applied. public int actualWidth { get; private set; } /// Height actually used for rendering after dynamic resolution and XR is applied. @@ -129,6 +131,7 @@ public void Reset() cameraFrameCount = 0; resetPostProcessingHistory = true; volumetricHistoryIsValid = false; + volumetricValidFrames = 0; colorPyramidHistoryIsValid = false; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs index 6430d0dc524..e11be2585eb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs @@ -742,8 +742,10 @@ TextureHandle VolumetricLightingPass(RenderGraph renderGraph, HDCamera hdCamera, FilterVolumetricLighting(data.parameters, data.lightingBuffer, ctx.cmd); }); - if (parameters.enableReprojection) + if (parameters.enableReprojection && hdCamera.volumetricValidFrames > 1) hdCamera.volumetricHistoryIsValid = true; // For the next frame.. + else + hdCamera.volumetricValidFrames++; return passData.lightingBuffer; }