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

Commit de275c7

Browse files
committed
Merge branch 'v2' into remove-multicompile-gamma
2 parents 924b621 + afe4b85 commit de275c7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

PostProcessing/Runtime/Effects/AutoExposure.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public sealed class AutoExposure : PostProcessEffectSettings
2424
[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

27-
[Min(0f), Tooltip("Exposure bias. Use this to offset the global exposure of the scene.")]
27+
[Min(0f), DisplayName("Exposure Compensation"), Tooltip("Use this to scale the global exposure of the scene.")]
2828
public FloatParameter keyValue = new FloatParameter { value = 1f };
2929

3030
[DisplayName("Type"), Tooltip("Use \"Progressive\" if you want auto exposure to be animated. Use \"Fixed\" otherwise.")]
@@ -97,12 +97,12 @@ public override void Render(PostProcessRenderContext context)
9797
settings.maxLuminance.value = Mathf.Max(minLum, maxLum);
9898

9999
// Compute average luminance & auto exposure
100-
bool isStatic = m_ResetHistory || !Application.isPlaying;
100+
bool firstFrame = m_ResetHistory || !Application.isPlaying;
101101
string adaptation = null;
102102

103-
if (isStatic)
103+
if (firstFrame || settings.eyeAdaptation.value == EyeAdaptation.Fixed)
104104
adaptation = "KAutoExposureAvgLuminance_fixed";
105-
else if (settings.eyeAdaptation.value == EyeAdaptation.Progressive)
105+
else
106106
adaptation = "KAutoExposureAvgLuminance_progressive";
107107

108108
var compute = context.resources.computeShaders.autoExposure;
@@ -112,7 +112,7 @@ public override void Render(PostProcessRenderContext context)
112112
cmd.SetComputeVectorParam(compute, "_Params2", new Vector4(settings.speedDown.value, settings.speedUp.value, settings.keyValue.value, Time.deltaTime));
113113
cmd.SetComputeVectorParam(compute, "_ScaleOffsetRes", context.logHistogram.GetHistogramScaleOffsetRes(context));
114114

115-
if (isStatic)
115+
if (firstFrame)
116116
{
117117
// We don't want eye adaptation when not in play mode because the GameView isn't
118118
// animated, thus making it harder to tweak. Just use the final audo exposure value.

PostProcessing/Runtime/Effects/ColorGrading.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ void RenderHDRPipeline2D(PostProcessRenderContext context)
342342
lutSheet.properties.SetVector(ShaderIDs.InvGamma, invgamma);
343343
lutSheet.properties.SetVector(ShaderIDs.Gain, gain);
344344

345-
lutSheet.properties.SetTexture(ShaderIDs.Curves, GetCurveTexture(false));
345+
lutSheet.properties.SetTexture(ShaderIDs.Curves, GetCurveTexture(true));
346346

347347
var tonemapper = settings.tonemapper.value;
348348
if (tonemapper == Tonemapper.Custom)

0 commit comments

Comments
 (0)