diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 3327e2c63a3..5e738679399 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -324,6 +324,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a nullref in volume system after deleting a volume object (case 1348374). - Fixed the APV UI loosing focus when the helpbox about baking appears in the probe volume. - Fixed enabling a lensflare in playmode. +- Fixed white flashes when history is reset due to changes on type of upsampler. ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard 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 4ec587d1fea..c75224bc7de 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 @@ -1206,6 +1206,8 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te { // Dynamic exposure - will be applied in the next frame // Not considered as a post-process so it's not affected by its enabled state + + TextureHandle exposureForImmediateApplication = TextureHandle.nullHandle; if (!IsExposureFixed(hdCamera) && hdCamera.exposureControlFS) { using (var builder = renderGraph.AddRenderPass("Dynamic Exposure", out var passData, ProfilingSampler.Get(HDProfileId.DynamicExposure))) @@ -1220,6 +1222,7 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te { DoHistogramBasedExposure(data, ctx.cmd); }); + exposureForImmediateApplication = passData.nextExposure; } else { @@ -1233,6 +1236,7 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te { DoDynamicExposure(data, ctx.cmd); }); + exposureForImmediateApplication = passData.nextExposure; } } @@ -1248,7 +1252,7 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te passData.height = hdCamera.actualHeight; passData.viewCount = hdCamera.viewCount; passData.source = builder.ReadTexture(source); - passData.prevExposure = builder.ReadTexture(renderGraph.ImportTexture(GetPreviousExposureTexture(hdCamera))); + passData.prevExposure = exposureForImmediateApplication; TextureHandle dest = GetPostprocessOutputHandle(renderGraph, "Apply Exposure Destination"); passData.destination = builder.WriteTexture(dest); @@ -1256,10 +1260,6 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te builder.SetRenderFunc( (ApplyExposureData data, RenderGraphContext ctx) => { - // Note: we use previous instead of current because the textures - // are swapped internally as the system expects the texture will be used - // on the next frame. So the actual "current" for this frame is in - // "previous". ctx.cmd.SetComputeTextureParam(data.applyExposureCS, data.applyExposureKernel, HDShaderIDs._ExposureTexture, data.prevExposure); ctx.cmd.SetComputeTextureParam(data.applyExposureCS, data.applyExposureKernel, HDShaderIDs._InputTexture, data.source); ctx.cmd.SetComputeTextureParam(data.applyExposureCS, data.applyExposureKernel, HDShaderIDs._OutputTexture, data.destination);