mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user