@@ -35,9 +35,7 @@ void RSManager::setupAA() {
35
35
new FXAA (m_pDevice.Get (), rw, rh, (FXAA::Quality)(Settings::get ().getAAQuality () - 1 )));
36
36
smaa = nullptr ;
37
37
}
38
- doAA = true ;
39
38
} else {
40
- doAA = false ;
41
39
fxaa = nullptr ;
42
40
smaa = nullptr ;
43
41
}
@@ -55,21 +53,17 @@ void RSManager::setupSSAO() {
55
53
unsigned int rw = Settings::get ().getRenderWidth ();
56
54
unsigned int rh = Settings::get ().getRenderHeight ();
57
55
ssao.reset (new SSAO (m_pDevice.Get (), rw, rh, Settings::get ().getSsaoStrength () - 1 , ssaoType));
58
- doSsao = true ;
59
56
} else {
60
57
ssao = nullptr ;
61
- doSsao = false ;
62
58
}
63
59
}
64
60
65
61
void RSManager::setupDoF () {
66
62
unsigned int dofRes = getDOFResolution ();
67
63
if (Settings::get ().getDOFBlurAmount ()) {
68
64
gauss.reset (new GAUSS (m_pDevice.Get (), dofRes * 16 / 9 , dofRes));
69
- doDofGauss = true ;
70
65
} else {
71
66
gauss = nullptr ;
72
- doDofGauss = false ;
73
67
}
74
68
}
75
69
@@ -131,7 +125,7 @@ HRESULT RSManager::redirectSetRenderTarget(DWORD RenderTargetIndex,
131
125
++mainRTuses;
132
126
}
133
127
// we are switching away from the initial 3D-rendered image, do AA and SSAO
134
- if (mainRTuses == 2 && mainRT && zSurf && (( ssao && doSsao) || (doAA && ( smaa || fxaa)) )) {
128
+ if (mainRTuses == 2 && mainRT && zSurf && (ssao || smaa || fxaa)) {
135
129
WRL::ComPtr<IDirect3DSurface9> oldRenderTarget;
136
130
ThrowIfFailed (m_pDevice->GetRenderTarget (0 , &oldRenderTarget));
137
131
if (oldRenderTarget == mainRT) {
@@ -153,7 +147,7 @@ HRESULT RSManager::redirectSetRenderTarget(DWORD RenderTargetIndex,
153
147
D3DRS_COLORWRITEENABLE,
154
148
D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE));
155
149
// perform AA processing
156
- if (doAA && ( smaa || fxaa) ) {
150
+ if (smaa || fxaa) {
157
151
if (smaa)
158
152
smaa->go (tex.Get (), tex.Get (), rgbaBuffer1Surf.Get (), SMAA::INPUT_COLOR);
159
153
else
@@ -162,7 +156,7 @@ HRESULT RSManager::redirectSetRenderTarget(DWORD RenderTargetIndex,
162
156
oldRenderTarget.Get (), nullptr , D3DTEXF_NONE));
163
157
}
164
158
// perform SSAO
165
- if (ssao && doSsao ) {
159
+ if (ssao) {
166
160
ssao->go (tex.Get (), zTex.Get (), rgbaBuffer1Surf.Get ());
167
161
ThrowIfFailed (m_pDevice->StretchRect (rgbaBuffer1Surf.Get (), nullptr ,
168
162
oldRenderTarget.Get (), nullptr , D3DTEXF_NONE));
@@ -173,7 +167,7 @@ HRESULT RSManager::redirectSetRenderTarget(DWORD RenderTargetIndex,
173
167
}
174
168
}
175
169
// DoF blur stuff
176
- if (gauss && doDofGauss ) {
170
+ if (gauss) {
177
171
WRL::ComPtr<IDirect3DSurface9> oldRenderTarget;
178
172
ThrowIfFailed (m_pDevice->GetRenderTarget (0 , &oldRenderTarget));
179
173
D3DSURFACE_DESC desc;
0 commit comments