summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderManager.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-03-04 16:39:50 +1000
committerStenzek <stenzek@gmail.com>2017-03-04 16:39:50 +1000
commit277829d842ae4aca234de95fb295ed9da043a9fa (patch)
tree43d6e4aa6db60b2f54a50ae09772ff0bd9962d28 /Source/Core/VideoCommon/PixelShaderManager.cpp
parentde230f3ebed097ec10dc86465744c17aea032d2e (diff)
VideoCommon: Eliminate static state in Renderer
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderManager.cpp b/Source/Core/VideoCommon/PixelShaderManager.cpp
index f029751363..c9e102ab5b 100644
--- a/Source/Core/VideoCommon/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/PixelShaderManager.cpp
@@ -27,7 +27,6 @@ void PixelShaderManager::Init()
s_bFogRangeAdjustChanged = true;
s_bViewPortChanged = false;
- SetEfbScaleChanged();
SetIndMatrixChanged(0);
SetIndMatrixChanged(1);
SetIndMatrixChanged(2);
@@ -78,7 +77,8 @@ void PixelShaderManager::SetConstants()
// so to simplify I use the hi coefficient as K in the shader taking 256 as the scale
// TODO: Shouldn't this be EFBToScaledXf?
constants.fogf[0][0] = ScreenSpaceCenter;
- constants.fogf[0][1] = (float)Renderer::EFBToScaledX((int)(2.0f * xfmem.viewport.wd));
+ constants.fogf[0][1] =
+ static_cast<float>(g_renderer->EFBToScaledX(static_cast<int>(2.0f * xfmem.viewport.wd)));
constants.fogf[0][2] = bpmem.fogRange.K[4].HI / 256.0f;
}
else
@@ -161,8 +161,8 @@ void PixelShaderManager::SetViewportChanged()
void PixelShaderManager::SetEfbScaleChanged()
{
- constants.efbscale[0] = 1.0f / Renderer::EFBToScaledXf(1);
- constants.efbscale[1] = 1.0f / Renderer::EFBToScaledYf(1);
+ constants.efbscale[0] = 1.0f / g_renderer->EFBToScaledXf(1);
+ constants.efbscale[1] = 1.0f / g_renderer->EFBToScaledYf(1);
dirty = true;
}