perf: snapshot interpolation default catchup speed increased to 2%, and slowdown speed increased to 4% to avoid jitter

This commit is contained in:
vis2k 2023-03-18 15:58:44 +08:00
parent 2aa6be9d89
commit 7d93d0156e
14 changed files with 28 additions and 28 deletions

View File

@ -28,11 +28,11 @@ public class SnapshotInterpolationSettings
[Tooltip("Local timeline acceleration in % while catching up.")]
[Range(0, 1)]
public double catchupSpeed = 0.01f; // 1%
public double catchupSpeed = 0.02f; // see snap interp demo. 1% is too slow.
[Tooltip("Local timeline slowdown in % while slowing down.")]
[Range(0, 1)]
public double slowdownSpeed = 0.01f; // 1%
public double slowdownSpeed = 0.04f; // slow down a little faster so we don't encounter empty buffer (= jitter)
[Tooltip("Catchup/Slowdown is adjusted over n-second exponential moving average.")]
public int driftEmaDuration = 1; // shouldn't need to modify this, but expose it anyway

View File

@ -368,8 +368,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -1970,8 +1970,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -216,8 +216,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -354,8 +354,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -355,8 +355,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -3278,8 +3278,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -276,8 +276,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -1198,8 +1198,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -904,8 +904,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -990,8 +990,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -278,8 +278,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -175,8 +175,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1

View File

@ -481,8 +481,8 @@ MonoBehaviour:
bufferTimeMultiplier: 2
catchupNegativeThreshold: -1
catchupPositiveThreshold: 1
catchupSpeed: 0.009999999776482582
slowdownSpeed: 0.009999999776482582
catchupSpeed: 0.019999999552965164
slowdownSpeed: 0.03999999910593033
driftEmaDuration: 1
dynamicAdjustment: 1
dynamicAdjustmentTolerance: 1