mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Cleanup and refactor of zfreeze port
Based on the feedback from pull request #1767 I have put in most of degasus's suggestions in here now. I think we have a real winner here as moving the code to VertexManagerBase for a function has allowed OGL to utilize zfreeze now :) Correct use of the vertex pointer has also corrected most of the issue found in pull request #1767 that JMC47 stated. Which also for me now has Mario Tennis working with no polygon spikes on the characters anymore! Shadows are still an issue and probably in the other games with shadow problems. Rebel Strike also seems better but random skybox glitches can show up.
This commit is contained in:

committed by
Scott Mansell

parent
937844b9e3
commit
613781c765
@ -14,8 +14,6 @@
|
||||
|
||||
bool PixelShaderManager::s_bFogRangeAdjustChanged;
|
||||
bool PixelShaderManager::s_bViewPortChanged;
|
||||
bool PixelShaderManager::s_bZSlopeChanged;
|
||||
static float zslope[3];
|
||||
|
||||
std::array<int4,4> PixelShaderManager::s_tev_color;
|
||||
std::array<int4,4> PixelShaderManager::s_tev_konst_color;
|
||||
@ -50,7 +48,7 @@ void PixelShaderManager::Dirty()
|
||||
SetDestAlpha();
|
||||
SetZTextureBias();
|
||||
SetViewportChanged();
|
||||
SetZSlopeChanged(0, 0, 1);
|
||||
SetZSlope(0, 0, 1);
|
||||
SetIndTexScaleChanged(false);
|
||||
SetIndTexScaleChanged(true);
|
||||
SetIndMatrixChanged(0);
|
||||
@ -115,17 +113,6 @@ void PixelShaderManager::SetConstants()
|
||||
dirty = true;
|
||||
s_bViewPortChanged = false;
|
||||
}
|
||||
|
||||
if (s_bZSlopeChanged)
|
||||
{
|
||||
constants.zslope[0] = zslope[0];
|
||||
constants.zslope[1] = zslope[1];
|
||||
constants.zslope[2] = zslope[2];
|
||||
constants.zslope[3] = 0;
|
||||
|
||||
dirty = true;
|
||||
s_bZSlopeChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetTevColor(int index, int component, s32 value)
|
||||
@ -182,12 +169,13 @@ void PixelShaderManager::SetViewportChanged()
|
||||
s_bFogRangeAdjustChanged = true; // TODO: Shouldn't be necessary with an accurate fog range adjust implementation
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetZSlopeChanged(float dfdx, float dfdy, float f0)
|
||||
void PixelShaderManager::SetZSlope(float dfdx, float dfdy, float f0)
|
||||
{
|
||||
zslope[0] = dfdx;
|
||||
zslope[1] = dfdy;
|
||||
zslope[2] = f0;
|
||||
s_bZSlopeChanged = true;
|
||||
constants.zslope[0] = dfdx;
|
||||
constants.zslope[1] = dfdy;
|
||||
constants.zslope[2] = f0;
|
||||
constants.zslope[3] = 0;
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetIndTexScaleChanged(bool high)
|
||||
|
Reference in New Issue
Block a user