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

Commit 905b64b

Browse files
authored
Merge pull request #4 from Unity-Technologies/master
Update from master
2 parents 6be6d70 + ac36f8b commit 905b64b

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

PostProcessing/Resources/Shaders/ACES.cginc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,13 @@ half3 Y_2_linCV(half3 Y, half Ymax, half Ymin)
620620

621621
half3 XYZ_2_xyY(half3 XYZ)
622622
{
623-
half divisor = max(dot(XYZ, (1.0).xxx), 1e-10);
623+
half divisor = max(dot(XYZ, (1.0).xxx), 1e-4);
624624
return half3(XYZ.xy / divisor, XYZ.y);
625625
}
626626

627627
half3 xyY_2_XYZ(half3 xyY)
628628
{
629-
half m = xyY.z / max(xyY.y, 1e-10);
629+
half m = xyY.z / max(xyY.y, 1e-4);
630630
half3 XYZ = half3(xyY.xz, (1.0 - xyY.x - xyY.y));
631631
XYZ.xz *= m;
632632
return XYZ;

PostProcessing/Runtime/Components/AmbientOcclusionComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ OcclusionSource occlusionSource
4242
if (context.isGBufferAvailable && !model.settings.forceForwardCompatibility)
4343
return OcclusionSource.GBuffer;
4444

45-
if (model.settings.highPrecision && !context.isGBufferAvailable)
45+
if (model.settings.highPrecision && (!context.isGBufferAvailable || model.settings.forceForwardCompatibility))
4646
return OcclusionSource.DepthTexture;
4747

4848
return OcclusionSource.DepthNormalsTexture;

PostProcessing/Runtime/Components/TaaComponent.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ static class Uniforms
1818

1919
readonly RenderBuffer[] m_MRT = new RenderBuffer[2];
2020

21-
int m_SampleIndex;
22-
bool m_ResetHistory;
21+
int m_SampleIndex = 0;
22+
bool m_ResetHistory = true;
2323

2424
RenderTexture m_HistoryTexture;
2525

@@ -198,6 +198,7 @@ public override void OnDisable()
198198

199199
m_HistoryTexture = null;
200200
m_SampleIndex = 0;
201+
ResetHistory();
201202
}
202203
}
203204
}

PostProcessing/Runtime/PostProcessingBehaviour.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ void OnEnable()
7676

7777
foreach (var component in m_Components)
7878
m_ComponentStates.Add(component, false);
79+
80+
useGUILayout = false;
7981
}
8082

8183
void OnPreCull()

PostProcessing/Runtime/PostProcessingContext.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ public bool isGBufferAvailable
3333

3434
public bool isHdr
3535
{
36+
// No UNITY_5_6_OR_NEWER defined in early betas of 5.6
37+
#if UNITY_5_6 || UNITY_5_6_OR_NEWER
38+
get { return camera.allowHDR; }
39+
#else
3640
get { return camera.hdr; }
41+
#endif
3742
}
3843

3944
public int width

0 commit comments

Comments
 (0)