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

Commit 655a504

Browse files
committed
Fixed broken color grading
1 parent 0726163 commit 655a504

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

PostProcessing/Runtime/Utils/Spline.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ public Spline(AnimationCurve curve, float zeroValue, bool loop, Vector2 bounds)
3636
m_Loop = loop;
3737
m_Range = bounds.magnitude;
3838
cachedData = new float[k_Precision];
39+
Cache(0, true);
3940
}
4041

41-
public void Cache(int frame)
42+
public void Cache(int frame, bool skipFrameCountTest = false)
4243
{
4344
// Only cache once per frame
4445
if (frame == frameCount)
@@ -63,7 +64,8 @@ public void Cache(int frame)
6364
for (int i = 0; i < k_Precision; i++)
6465
cachedData[i] = Evaluate((float)i * k_Step);
6566

66-
frameCount = Time.renderedFrameCount;
67+
if (!skipFrameCountTest)
68+
frameCount = Time.renderedFrameCount;
6769
}
6870

6971
public float Evaluate(float t)

0 commit comments

Comments
 (0)