diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2d9422a84f7..64fdccbdf37 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -45,6 +45,7 @@ The version number for this package has increased due to a version update of a r - Fixed undo after enabling compositor. - Fixed the ray tracing shadow UI being displayed while it shouldn't (case 1286391). - Fixed issues with physically-based DoF, improved speed and robustness +- Fixed a warning happening when putting the range of lights to 0. ### Changed - Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass. diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 0d50086f7f2..42631e9cb74 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -732,6 +732,9 @@ static void DrawEmissionContent(SerializedHDLight serialized, Editor owner) #else serialized.settings.DrawRange(false); #endif + // Make sure the range is not 0.0 + serialized.settings.range.floatValue = Mathf.Max(0.001f, serialized.settings.range.floatValue); + if (EditorGUI.EndChangeCheck()) { // For GI we need to detect any change on additional data and call SetLightDirty + For intensity we need to detect light shape change