From 42eadad032bef08eae0e4f3e6b922793848e3ae1 Mon Sep 17 00:00:00 2001 From: Aleksandr Kirillov Date: Tue, 7 Apr 2020 10:10:33 +0200 Subject: [PATCH] Fixed case 1226208 --- com.unity.render-pipelines.universal/CHANGELOG.md | 1 + .../Runtime/ForwardRenderer.cs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index db4f96b3d94..5054822e9df 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where particles using Sprite Shader Graph shaders were invisible. - Fixed an issue where Scene objects might be incorrectly affected by 2D Lights from a previous Sorting Layer. - Fixed an issue where errors would appear in the Console when entering Play Mode with a 2D Light selected in the Hierarchy. [Case 1226918](https://issuetracker.unity3d.com/issues/errors-appear-in-the-console-when-global-2d-light-is-selected-in-hierarchy) +- Fixed an issue when Linear -> sRGB conversion would not happen on some Android devices. [case 1226208](https://issuetracker.unity3d.com/issues/no-srgb-conversion-on-some-android-devices-when-using-the-universal-render-pipeline) ## [8.0.0] - 2020-05-25 ### Added diff --git a/com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs b/com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs index b18335d4f5b..afe3ffe7bb1 100644 --- a/com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs +++ b/com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs @@ -271,19 +271,18 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re // When post-processing is enabled we can use the stack to resolve rendering to camera target (screen or RT). // However when there are render passes executing after post we avoid resolving to screen so rendering continues (before sRGBConvertion etc) - bool dontResolvePostProcessingToCameraTarget = hasCaptureActions || hasPassesAfterPostProcessing || applyFinalPostProcessing; + bool resolvePostProcessingToCameraTarget = !hasCaptureActions && !hasPassesAfterPostProcessing && !applyFinalPostProcessing; if (lastCameraInTheStack) { // Post-processing will resolve to final target. No need for final blit pass. if (applyPostProcessing) { - var destination = dontResolvePostProcessingToCameraTarget ? m_AfterPostProcessColor : RenderTargetHandle.CameraTarget; + var destination = resolvePostProcessingToCameraTarget ? RenderTargetHandle.CameraTarget : m_AfterPostProcessColor; // if resolving to screen we need to be able to perform sRGBConvertion in post-processing if necessary - bool doSRGBConvertion = !(dontResolvePostProcessingToCameraTarget || (m_ActiveCameraColorAttachment != RenderTargetHandle.CameraTarget)); + bool doSRGBConvertion = resolvePostProcessingToCameraTarget; m_PostProcessPass.Setup(cameraTargetDescriptor, m_ActiveCameraColorAttachment, destination, m_ActiveCameraDepthAttachment, m_ColorGradingLut, applyFinalPostProcessing, doSRGBConvertion); - Debug.Assert(applyPostProcessing || doSRGBConvertion, "This will do unnecessary blit!"); EnqueuePass(m_PostProcessPass); }