From d78a9eb560d3ea6edaa4e4ddb8c1b03e208c2bac Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Mon, 6 Dec 2021 14:46:40 +0100 Subject: [PATCH] Fixed spot light shadows near plane --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Lighting/Shadow/HDShadowUtils.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 05fb3d4273c..f55f80b7fe4 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a warning because of a null texture in the lens flare pass. - Fixed a nullref when enabling raycount without ray tracing. - Fixed error thrown when layered lit material has an invalid material type. +- Fixed spot light shadows near plane ## [13.1.2] - 2021-11-05 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs index f75f52f683b..c3e2337fd27 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs @@ -5,7 +5,7 @@ namespace UnityEngine.Rendering.HighDefinition // TODO remove every occurrence of ShadowSplitData in function parameters when we'll have scriptable culling static class HDShadowUtils { - public static readonly float k_MinShadowNearPlane = 0.0001f; + public static readonly float k_MinShadowNearPlane = 0.01f; public static readonly float k_MaxShadowNearPlane = 10.0f; public static float Asfloat(uint val) { unsafe { return *((float*)&val); } }