From 37cf9886ccdd252db322b05a7839638374827d83 Mon Sep 17 00:00:00 2001 From: Peter Bay Bastian Date: Thu, 17 Feb 2022 12:40:21 +0100 Subject: [PATCH] Fixed "skip iterations" issue on Bloom --- com.unity.render-pipelines.universal/CHANGELOG.md | 2 +- .../Runtime/Passes/PostProcessPass.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index fd4aab8b52c..f3473bc2f68 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with too many variants being included in ShaderGraph shaders used in URP. [[case 1378545](https://issuetracker.unity3d.com/issues/some-lit-shaders-are-having-huge-count-of-variants-which-leads-to-project-build-prevention)] - Fixed Light2D Sprite Light not updating when Sprite properties are modified [case 1396416][case 1396418][case 1396422] - Fixed ScreenSpaceShadows target which was not bound during draw. [case 1388353](https://issuetracker.unity3d.com/product/unity/issues/guid/1388353/) - +- Fixed an issue where the "Skip Iterations" option on Bloom could cause the effect to not run at all, which would cause flickering due to the Bloom texture being uninitialized. [case 1382991](https://issuetracker.unity3d.com/product/unity/issues/guid/1382991/) ## [13.1.5] - 2021-12-17 diff --git a/com.unity.render-pipelines.universal/Runtime/Passes/PostProcessPass.cs b/com.unity.render-pipelines.universal/Runtime/Passes/PostProcessPass.cs index 63dfa75c85b..75307c55a91 100644 --- a/com.unity.render-pipelines.universal/Runtime/Passes/PostProcessPass.cs +++ b/com.unity.render-pipelines.universal/Runtime/Passes/PostProcessPass.cs @@ -1100,7 +1100,7 @@ void SetupBloom(CommandBuffer cmd, RenderTargetIdentifier source, Material uberM int maxSize = Mathf.Max(tw, th); int iterations = Mathf.FloorToInt(Mathf.Log(maxSize, 2f) - 1); iterations -= m_Bloom.skipIterations.value; - int mipCount = Mathf.Clamp(iterations, 1, k_MaxPyramidSize); + int mipCount = Mathf.Clamp(iterations, 2, k_MaxPyramidSize); // Pre-filtering parameters float clamp = m_Bloom.clamp.value;