From 96dba59ebc1bf11c97b44575c79681f92b2b6416 Mon Sep 17 00:00:00 2001 From: Jonas Sideravicius Date: Wed, 13 Jul 2022 17:37:00 +0300 Subject: [PATCH 1/2] backport remaining changes to avoid lighting banding --- com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl index 514a53320c6..e4f12870952 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl @@ -1224,7 +1224,7 @@ bool HasFlag(uint bitfield, uint flag) // Normalize that account for vectors with zero length real3 SafeNormalize(float3 inVec) { - real dp3 = max(FLT_MIN, dot(inVec, inVec)); + float dp3 = max(FLT_MIN, dot(inVec, inVec)); return inVec * rsqrt(dp3); } From 6e550e20419267eefdbbd4542ab15b9fa6ab754a Mon Sep 17 00:00:00 2001 From: Jonas Sideravicius Date: Thu, 14 Jul 2022 10:59:08 +0300 Subject: [PATCH 2/2] Update CHANGELOG.md --- com.unity.render-pipelines.universal/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 0ffc27c92dd..98fbe09ba39 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where ShadowCaster2Ds were sometimes being rendered twice in the editor while in playmode. - Fixed SSAO to work in VR mode. Normal buffer stores normals in world space. - Fixed an issue in where the _ScreenParams is not setup correctly. +- Fixed lighting banding issue on mobile platforms ## [10.9.0] - 2021-12-06