Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PixelShaderManager: Reload fog range adjustment shader constants upon…
… viewport change.

Fixes issue 5618.
  • Loading branch information
neobrain committed Mar 15, 2013
1 parent def578f commit e877b50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/VideoCommon/Src/BPMemory.h
Expand Up @@ -93,7 +93,7 @@
#define BPMEM_TEV_ALPHA_ENV 0xC1 // 0xC1 + (2 * 16)
#define BPMEM_TEV_REGISTER_L 0xE0 // 0xE0 + (2 * 4)
#define BPMEM_TEV_REGISTER_H 0xE1 // 0xE1 + (2 * 4)
#define BPMEM_FOGRANGE 0xE8
#define BPMEM_FOGRANGE 0xE8 // 0xE8 + 6
#define BPMEM_FOGPARAM0 0xEE
#define BPMEM_FOGBMAGNITUDE 0xEF
#define BPMEM_FOGBEXPONENT 0xF0
Expand Down Expand Up @@ -988,7 +988,7 @@ struct BPMemory
FourTexUnits tex[2]; //80-bf
TevStageCombiner combiners[16]; //0xC0-0xDF
TevReg tevregs[4]; //0xE0
FogRangeParams fogRange;
FogRangeParams fogRange; // 0xE8
FogParams fog; //0xEE,0xEF,0xF0,0xF1,0xF2
AlphaTest alpha_test; //0xF3
ZTex1 ztex1; //0xf4,0xf5
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoCommon/Src/PixelShaderManager.cpp
Expand Up @@ -413,6 +413,7 @@ void PixelShaderManager::SetZTextureBias(u32 bias)
void PixelShaderManager::SetViewportChanged()
{
s_bDepthRangeChanged = true;
s_bFogRangeAdjustChanged = true; // TODO: Shouldn't be necessary with an accurate fog range adjust implementation
}

void PixelShaderManager::SetIndTexScaleChanged(u8 stagemask)
Expand Down

0 comments on commit e877b50

Please sign in to comment.