Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 10418af

Browse files
committed
Tweaked AutoExposure UI to use sliders for min/max as values are clamped anyway
1 parent e053c92 commit 10418af

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

PostProcessing/Runtime/Effects/AutoExposure.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public sealed class AutoExposure : PostProcessEffectSettings
1818
[MinMax(1f, 99f), DisplayName("Filtering (%)"), Tooltip("Filters the bright & dark part of the histogram when computing the average luminance to avoid very dark pixels & very bright pixels from contributing to the auto exposure. Unit is in percent.")]
1919
public Vector2Parameter filtering = new Vector2Parameter { value = new Vector2(50f, 95f) };
2020

21-
[DisplayName("Minimum (EV)"), Tooltip("Minimum average luminance to consider for auto exposure (in EV).")]
21+
[Range(LogHistogram.rangeMin, LogHistogram.rangeMax), DisplayName("Minimum (EV)"), Tooltip("Minimum average luminance to consider for auto exposure (in EV).")]
2222
public FloatParameter minLuminance = new FloatParameter { value = 0f };
2323

24-
[DisplayName("Maximum (EV)"), Tooltip("Maximum average luminance to consider for auto exposure (in EV).")]
24+
[Range(LogHistogram.rangeMin, LogHistogram.rangeMax), DisplayName("Maximum (EV)"), Tooltip("Maximum average luminance to consider for auto exposure (in EV).")]
2525
public FloatParameter maxLuminance = new FloatParameter { value = 0f };
2626

2727
[Min(0f), Tooltip("Exposure bias. Use this to offset the global exposure of the scene.")]

PostProcessing/Runtime/Utils/LogHistogram.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ namespace UnityEngine.Rendering.PostProcessing
22
{
33
public sealed class LogHistogram
44
{
5-
public static readonly int rangeMin = -9; // ev
6-
public static readonly int rangeMax = 9; // ev
5+
public const int rangeMin = -9; // ev
6+
public const int rangeMax = 9; // ev
77

88
// Don't forget to update 'ExposureHistogram.hlsl' if you change these values !
99
const int k_Bins = 128;

0 commit comments

Comments
 (0)