diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md
index c0b6a78000a..8ec1d5a3084 100644
--- a/com.unity.render-pipelines.high-definition/CHANGELOG.md
+++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added a cameraCullingResult field in Custom Pass Context to give access to both custom pass and camera culling result.
- Added a slider to control the fallback value of the directional shadow when the cascade have no coverage.
- Added a toggle to allow to include or exclude smooth surfaces from ray traced reflection denoising.
+- Added light unit slider for automatic and automatic histrogram exposure limits.
### Fixed
- Fixed probe volumes debug views.
diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/LightUnit/LightUnitSlider.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/LightUnit/LightUnitSlider.cs
index a5e931857a3..8790b9f9bb6 100644
--- a/com.unity.render-pipelines.high-definition/Editor/Lighting/LightUnit/LightUnitSlider.cs
+++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/LightUnit/LightUnitSlider.cs
@@ -84,7 +84,7 @@ LightUnitSliderUIRange CurrentRange(float value)
}
}
- var cautionValue = m_Descriptor.sliderRange.y;
+ var cautionValue = value < m_Descriptor.sliderRange.x ? m_Descriptor.sliderRange.x : m_Descriptor.sliderRange.y;
var cautionTooltip = value < m_Descriptor.sliderRange.x ? m_Descriptor.belowRangeTooltip : m_Descriptor.aboveRangeTooltip;
return LightUnitSliderUIRange.CautionRange(cautionTooltip, cautionValue);
}
diff --git a/com.unity.render-pipelines.high-definition/Editor/PostProcessing/ExposureEditor.cs b/com.unity.render-pipelines.high-definition/Editor/PostProcessing/ExposureEditor.cs
index b4fc8ca7e38..1fdcb1f2168 100644
--- a/com.unity.render-pipelines.high-definition/Editor/PostProcessing/ExposureEditor.cs
+++ b/com.unity.render-pipelines.high-definition/Editor/PostProcessing/ExposureEditor.cs
@@ -91,7 +91,7 @@ public override void OnInspectorGUI()
}
else if (mode == (int)ExposureMode.Fixed)
{
- DoFixedExposureField(m_FixedExposure);
+ DoExposurePropertyField(m_FixedExposure);
PropertyField(m_Compensation);
}
else
@@ -152,8 +152,8 @@ public override void OnInspectorGUI()
}
else if (!(mode == (int)ExposureMode.AutomaticHistogram && m_HistogramCurveRemapping.value.boolValue))
{
- PropertyField(m_LimitMin);
- PropertyField(m_LimitMax);
+ DoExposurePropertyField(m_LimitMin);
+ DoExposurePropertyField(m_LimitMax);
}
PropertyField(m_Compensation);
@@ -204,18 +204,18 @@ public override void OnInspectorGUI()
}
}
- // TODO: See if it's possible to refactor into a custom VolumeParameterDrawer
- void DoFixedExposureField(SerializedDataParameter fixedExposure)
+ // TODO: See if this can be refactored into a custom VolumeParameterDrawer
+ void DoExposurePropertyField(SerializedDataParameter exposureProperty)
{
using (new EditorGUILayout.HorizontalScope())
{
- DrawOverrideCheckbox(fixedExposure);
+ DrawOverrideCheckbox(exposureProperty);
- using (new EditorGUI.DisabledScope(!fixedExposure.overrideState.boolValue))
- EditorGUILayout.LabelField(fixedExposure.displayName);
+ using (new EditorGUI.DisabledScope(!exposureProperty.overrideState.boolValue))
+ EditorGUILayout.LabelField(exposureProperty.displayName);
}
- using (new EditorGUI.DisabledScope(!fixedExposure.overrideState.boolValue))
+ using (new EditorGUI.DisabledScope(!exposureProperty.overrideState.boolValue))
{
var xOffset = EditorGUIUtility.labelWidth + 22;
var lineRect = EditorGUILayout.GetControlRect();
@@ -225,12 +225,12 @@ void DoFixedExposureField(SerializedDataParameter fixedExposure)
var sliderRect = lineRect;
sliderRect.y -= EditorGUIUtility.singleLineHeight;
k_LightUnitSlider.SetSerializedObject(serializedObject);
- k_LightUnitSlider.DrawExposureSlider(m_FixedExposure.value, sliderRect);
+ k_LightUnitSlider.DrawExposureSlider(exposureProperty.value, sliderRect);
- // GUIContent.none disables horizontal scrolling, ur TrTextContent and adjust the rect to make it work
+ // GUIContent.none disables horizontal scrolling, use TrTextContent and adjust the rect to make it work.
lineRect.x -= EditorGUIUtility.labelWidth + 2;
lineRect.width += EditorGUIUtility.labelWidth + 2;
- EditorGUI.PropertyField(lineRect, m_FixedExposure.value, EditorGUIUtility.TrTextContent(" "));
+ EditorGUI.PropertyField(lineRect, exposureProperty.value, EditorGUIUtility.TrTextContent(" "));
}
}
}
diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Components/Exposure.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Components/Exposure.cs
index 4f44b8f0080..2c8ccad9052 100644
--- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Components/Exposure.cs
+++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Components/Exposure.cs
@@ -49,14 +49,14 @@ public sealed class Exposure : VolumeComponent, IPostProcessComponent
/// This parameter is only used when or is set.
///
[Tooltip("Sets the minimum value that the Scene exposure can be set to.")]
- public FloatParameter limitMin = new FloatParameter(-10f);
+ public FloatParameter limitMin = new FloatParameter(-1f);
///
/// Sets the maximum value that the Scene exposure can be set to.
/// This parameter is only used when or is set.
///
[Tooltip("Sets the maximum value that the Scene exposure can be set to.")]
- public FloatParameter limitMax = new FloatParameter(20f);
+ public FloatParameter limitMax = new FloatParameter(14f);
///
/// Specifies a curve that remaps the Scene exposure on the x-axis to the exposure you want on the y-axis.