This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
PostProcessing/Runtime/Effects Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ enum Pass
36
36
bool m_ResetHistory = true ;
37
37
38
38
const int k_SampleCount = 8 ;
39
- int m_SampleIndex ;
39
+ public int sampleIndex { get ; private set ; }
40
40
41
41
// Ping-pong between two history textures as we can't read & write the same target in the
42
42
// same pass
@@ -71,12 +71,12 @@ Vector2 GenerateRandomOffset()
71
71
// The variance between 0 and the actual halton sequence values reveals noticeable instability
72
72
// in Unity's shadow maps, so we avoid index 0.
73
73
var offset = new Vector2 (
74
- HaltonSeq . Get ( ( m_SampleIndex & 1023 ) + 1 , 2 ) - 0.5f ,
75
- HaltonSeq . Get ( ( m_SampleIndex & 1023 ) + 1 , 3 ) - 0.5f
74
+ HaltonSeq . Get ( ( sampleIndex & 1023 ) + 1 , 2 ) - 0.5f ,
75
+ HaltonSeq . Get ( ( sampleIndex & 1023 ) + 1 , 3 ) - 0.5f
76
76
) ;
77
77
78
- if ( ++ m_SampleIndex >= k_SampleCount )
79
- m_SampleIndex = 0 ;
78
+ if ( ++ sampleIndex >= k_SampleCount )
79
+ sampleIndex = 0 ;
80
80
81
81
return offset ;
82
82
}
@@ -232,7 +232,7 @@ internal void Release()
232
232
}
233
233
}
234
234
235
- m_SampleIndex = 0 ;
235
+ sampleIndex = 0 ;
236
236
m_HistoryPingPong [ 0 ] = 0 ;
237
237
m_HistoryPingPong [ 1 ] = 0 ;
238
238
You can’t perform that action at this time.
0 commit comments