From acb9e7ca290d2d71bb8bd0da68edc40bdcb1d266 Mon Sep 17 00:00:00 2001 From: fgfemperor Date: Mon, 21 Dec 2009 20:30:01 +0000 Subject: [PATCH] NSMB background fix. Fixes 1654. There was a problem with the fog calculations... Now NSMB shows the background, while the fog still works! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4714 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/PixelShaderManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp index 1d7478c018..4ec14ea948 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp @@ -206,7 +206,7 @@ void PixelShaderManager::SetConstants() { if(!g_ActiveConfig.bDisableFog) { - float a = bpmem.fog.a.GetA() * ((float)(1 << bpmem.fog.b_shift)); + float a = bpmem.fog.a.GetA() * ((float)(1 << (bpmem.fog.b_shift - 1))); 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); }