mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-29 10:20:36 +00:00
PixelShaderManager: Fizzle out fog changes when disabled here
This lets us remove a use of GetConfig.
This commit is contained in:
parent
fe645b888b
commit
08611c3f36
@ -229,8 +229,6 @@ bool GetConfig(const int &type)
|
|||||||
{
|
{
|
||||||
case CONFIG_ISWII:
|
case CONFIG_ISWII:
|
||||||
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
return SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
||||||
case CONFIG_DISABLEFOG:
|
|
||||||
return g_ActiveConfig.bDisableFog;
|
|
||||||
case CONFIG_SHOWEFBREGIONS:
|
case CONFIG_SHOWEFBREGIONS:
|
||||||
return g_ActiveConfig.bShowEFBCopyRegions;
|
return g_ActiveConfig.bShowEFBCopyRegions;
|
||||||
default:
|
default:
|
||||||
|
@ -18,7 +18,6 @@ namespace BPFunctions
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
CONFIG_ISWII = 0,
|
CONFIG_ISWII = 0,
|
||||||
CONFIG_DISABLEFOG,
|
|
||||||
CONFIG_SHOWEFBREGIONS
|
CONFIG_SHOWEFBREGIONS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -290,18 +290,18 @@ void BPWritten(const BPCmd& bp)
|
|||||||
case BPMEM_FOGRANGE+3:
|
case BPMEM_FOGRANGE+3:
|
||||||
case BPMEM_FOGRANGE+4:
|
case BPMEM_FOGRANGE+4:
|
||||||
case BPMEM_FOGRANGE+5:
|
case BPMEM_FOGRANGE+5:
|
||||||
if (!GetConfig(CONFIG_DISABLEFOG) && bp.changes)
|
if (bp.changes)
|
||||||
PixelShaderManager::SetFogRangeAdjustChanged();
|
PixelShaderManager::SetFogRangeAdjustChanged();
|
||||||
break;
|
break;
|
||||||
case BPMEM_FOGPARAM0:
|
case BPMEM_FOGPARAM0:
|
||||||
case BPMEM_FOGBMAGNITUDE:
|
case BPMEM_FOGBMAGNITUDE:
|
||||||
case BPMEM_FOGBEXPONENT:
|
case BPMEM_FOGBEXPONENT:
|
||||||
case BPMEM_FOGPARAM3:
|
case BPMEM_FOGPARAM3:
|
||||||
if (!GetConfig(CONFIG_DISABLEFOG) && bp.changes)
|
if (bp.changes)
|
||||||
PixelShaderManager::SetFogParamChanged();
|
PixelShaderManager::SetFogParamChanged();
|
||||||
break;
|
break;
|
||||||
case BPMEM_FOGCOLOR: // Fog Color
|
case BPMEM_FOGCOLOR: // Fog Color
|
||||||
if (!GetConfig(CONFIG_DISABLEFOG) && bp.changes)
|
if (bp.changes)
|
||||||
PixelShaderManager::SetFogColorChanged();
|
PixelShaderManager::SetFogColorChanged();
|
||||||
break;
|
break;
|
||||||
case BPMEM_ALPHACOMPARE: // Compare Alpha Values
|
case BPMEM_ALPHACOMPARE: // Compare Alpha Values
|
||||||
|
@ -268,6 +268,9 @@ void PixelShaderManager::SetTexCoordChanged(u8 texmapid)
|
|||||||
|
|
||||||
void PixelShaderManager::SetFogColorChanged()
|
void PixelShaderManager::SetFogColorChanged()
|
||||||
{
|
{
|
||||||
|
if (g_ActiveConfig.bDisableFog)
|
||||||
|
return;
|
||||||
|
|
||||||
constants.fogcolor[0] = bpmem.fog.color.r;
|
constants.fogcolor[0] = bpmem.fog.color.r;
|
||||||
constants.fogcolor[1] = bpmem.fog.color.g;
|
constants.fogcolor[1] = bpmem.fog.color.g;
|
||||||
constants.fogcolor[2] = bpmem.fog.color.b;
|
constants.fogcolor[2] = bpmem.fog.color.b;
|
||||||
@ -295,6 +298,9 @@ void PixelShaderManager::SetFogParamChanged()
|
|||||||
|
|
||||||
void PixelShaderManager::SetFogRangeAdjustChanged()
|
void PixelShaderManager::SetFogRangeAdjustChanged()
|
||||||
{
|
{
|
||||||
|
if (g_ActiveConfig.bDisableFog)
|
||||||
|
return;
|
||||||
|
|
||||||
s_bFogRangeAdjustChanged = true;
|
s_bFogRangeAdjustChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user