@@ -40,8 +40,6 @@ enum Pass
40
40
readonly float [ ] m_InvThicknessTable = new float [ 12 ] ;
41
41
readonly float [ ] m_SampleWeightTable = new float [ 12 ] ;
42
42
43
- readonly int [ ] m_Widths = new int [ 7 ] ;
44
- readonly int [ ] m_Heights = new int [ 7 ] ;
45
43
// Scaled dimensions used with dynamic resolution
46
44
readonly int [ ] m_ScaledWidths = new int [ 7 ] ;
47
45
readonly int [ ] m_ScaledHeights = new int [ 7 ] ;
@@ -148,18 +146,14 @@ Vector3 GetSizeArray(MipLevel mip)
148
146
149
147
public void GenerateAOMap ( CommandBuffer cmd , Camera camera , RenderTargetIdentifier destination , RenderTargetIdentifier ? depthMap , bool invert , bool isMSAA )
150
148
{
151
- // Base size
152
- m_Widths [ 0 ] = camera . pixelWidth * ( RuntimeUtilities . isSinglePassStereoEnabled ? 2 : 1 ) ;
153
- m_Heights [ 0 ] = camera . pixelHeight ;
149
+ // Base size
154
150
m_ScaledWidths [ 0 ] = camera . scaledPixelWidth * ( RuntimeUtilities . isSinglePassStereoEnabled ? 2 : 1 ) ;
155
151
m_ScaledHeights [ 0 ] = camera . scaledPixelHeight ;
156
152
157
153
// L1 -> L6 sizes
158
154
for ( int i = 1 ; i < 7 ; i ++ )
159
155
{
160
156
int div = 1 << i ;
161
- m_Widths [ i ] = ( m_Widths [ 0 ] + ( div - 1 ) ) / div ;
162
- m_Heights [ i ] = ( m_Heights [ 0 ] + ( div - 1 ) ) / div ;
163
157
m_ScaledWidths [ i ] = ( m_ScaledWidths [ 0 ] + ( div - 1 ) ) / div ;
164
158
m_ScaledHeights [ i ] = ( m_ScaledHeights [ 0 ] + ( div - 1 ) ) / div ;
165
159
}
@@ -186,7 +180,7 @@ public void GenerateAOMap(CommandBuffer cmd, Camera camera, RenderTargetIdentifi
186
180
}
187
181
188
182
void PushAllocCommands ( CommandBuffer cmd , bool isMSAA )
189
- {
183
+ {
190
184
if ( isMSAA )
191
185
{
192
186
Alloc ( cmd , ShaderIDs . LinearDepth , MipLevel . Original , RenderTextureFormat . RGHalf , true ) ;
0 commit comments