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

Commit 13b7832

Browse files
committed
2 parents 483353e + e680f54 commit 13b7832

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

PostProcessing/Runtime/Effects/TemporalAntialiasing.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ internal void ResetHistory()
6969

7070
Vector2 GenerateRandomOffset()
7171
{
72+
// The variance between 0 and the actual halton sequence values reveals noticeable instability
73+
// in Unity's shadow maps, so we avoid index 0.
7274
var offset = new Vector2(
73-
HaltonSeq.Get(m_SampleIndex & 1023, 2),
74-
HaltonSeq.Get(m_SampleIndex & 1023, 3)
75+
HaltonSeq.Get((m_SampleIndex & 1023) + 1, 2) - 0.5f,
76+
HaltonSeq.Get((m_SampleIndex & 1023) + 1, 3) - 0.5f
7577
);
7678

7779
if (++m_SampleIndex >= k_SampleCount)

PostProcessing/Runtime/PostProcessRenderContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public void Reset()
127127

128128
resources = null;
129129
propertySheets = null;
130-
userData = null;
131130
debugLayer = null;
132131
isSceneView = false;
133132
antialiasing = PostProcessLayer.Antialiasing.None;

0 commit comments

Comments
 (0)