summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
diff options
context:
space:
mode:
authorRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2009-12-09 13:51:28 +0000
committerRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2009-12-09 13:51:28 +0000
commit0bc7fa7bf5d37463fbb414062335465275712730 (patch)
treed092d41c6bae1481fe61fadc84a11e3cf186b49a /Source/Core/VideoCommon/Src/PixelShaderManager.cpp
parenta1d612e94687469a11a89ced9449da03e43b2d6c (diff)
Small fix for the last commit, and a little fix for disable fog to really disable it :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4662 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderManager.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
index 9e516be8fb..1d7478c018 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
@@ -22,6 +22,7 @@
#include "Statistics.h"
#include "PixelShaderManager.h"
#include "VideoCommon.h"
+#include "VideoConfig.h"
static int s_nColorsChanged[2]; // 0 - regular colors, 1 - k colors
static int s_nIndTexMtxChanged;
@@ -203,9 +204,16 @@ void PixelShaderManager::SetConstants()
if (s_bFogParamChanged)
{
- float a = bpmem.fog.a.GetA() * ((float)(1 << bpmem.fog.b_shift));
- float b = ((float)bpmem.fog.b_magnitude / 8388638) * ((float)(1 << (bpmem.fog.b_shift - 1)));
- SetPSConstant4f(C_FOG + 1, a, b, bpmem.fog.c_proj_fsel.GetC(), 0);
+ if(!g_ActiveConfig.bDisableFog)
+ {
+ float a = bpmem.fog.a.GetA() * ((float)(1 << bpmem.fog.b_shift));
+ float b = ((float)bpmem.fog.b_magnitude / 8388638) * ((float)(1 << (bpmem.fog.b_shift - 1)));
+ SetPSConstant4f(C_FOG + 1, a, b, bpmem.fog.c_proj_fsel.GetC(), 0);
+ }
+ else
+ {
+ SetPSConstant4f(C_FOG + 1, 0.0, 1.0, 1.0, 0);
+ }
s_bFogParamChanged = false;
}