From 8f22f3bfcee4c8a13c5f3350dfc1e42587c3ad6c Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Mon, 30 Aug 2021 14:44:09 +0200 Subject: [PATCH] Allow negative wind speed parameter --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/Sky/VisualEnvironmentEditor.cs | 2 +- .../Runtime/Sky/VisualEnvironment.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2f068d416b8..2971190cdb1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -377,6 +377,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed lens flare not rendering correctly with TAAU or DLSS. - Fixed case where the SceneView don't refresh when using LightExplorer with a running and Paused game (1354129) - Fixed wrong ordering in FrameSettings (Normalize Reflection Probes) +- Allow negative wind speed parameter. ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/VisualEnvironmentEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Sky/VisualEnvironmentEditor.cs index 25f80f905fe..f5f5bb7c49c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Sky/VisualEnvironmentEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/VisualEnvironmentEditor.cs @@ -223,7 +223,7 @@ public override bool OnGUI(SerializedDataParameter parameter, GUIContent title) if (!LocalWindParameterDrawer.BeginGUI(out var rect, title, parameter, mode)) { var value = parameter.value.FindPropertyRelative("customValue"); - value.floatValue = Mathf.Max(EditorGUI.FloatField(rect, title, value.floatValue), 0.0f); + value.floatValue = EditorGUI.FloatField(rect, title, value.floatValue); } LocalWindParameterDrawer.EndGUI(mode); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs index 9ac8b17a8aa..a3b74156caf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs @@ -23,7 +23,7 @@ public sealed class VisualEnvironment : VolumeComponent [Header("Wind")] public ClampedFloatParameter windOrientation = new ClampedFloatParameter(0.0f, 0.0f, 360.0f); /// Controls the global wind speed in kilometers per hour. - public MinFloatParameter windSpeed = new MinFloatParameter(100.0f, 0.0f); + public FloatParameter windSpeed = new FloatParameter(100.0f); // Deprecated, kept for migration [SerializeField]