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

Commit 36a9147

Browse files
committed
Use an internal RNG instead of Unity's
1 parent 84610c1 commit 36a9147

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717
### Changed
1818
- Warning for mobiles about using post-processing with non-fullscreen cameras.
1919
- Directly to Camera Target on the PostProcessLayer component is now disabled by default.
20+
- The framework now uses its own random number generator instead of the default Unity one.
2021

2122
## [2.1.6] - 2019-04-11
2223

PostProcessing/Runtime/Effects/Dithering.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace UnityEngine.Rendering.PostProcessing
1010
internal sealed class Dithering
1111
{
1212
int m_NoiseTextureIndex = 0;
13+
System.Random m_Random = new System.Random(1234);
1314

1415
internal void Render(PostProcessRenderContext context)
1516
{
@@ -24,8 +25,8 @@ internal void Render(PostProcessRenderContext context)
2425
if (++m_NoiseTextureIndex >= blueNoise.Length)
2526
m_NoiseTextureIndex = 0;
2627

27-
float rndOffsetX = Random.value;
28-
float rndOffsetY = Random.value;
28+
float rndOffsetX = (float)m_Random.NextDouble();
29+
float rndOffsetY = (float)m_Random.NextDouble();
2930
#endif
3031

3132
var noiseTex = blueNoise[m_NoiseTextureIndex];

0 commit comments

Comments
 (0)