Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalc

- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze
- Fixed another Pixel Shader bug in D3D that was giving me grief
This commit is contained in:
NanoByte011
2015-01-13 02:55:25 -07:00
committed by Scott Mansell
parent 6d5065c58d
commit add59b3bea
7 changed files with 52 additions and 26 deletions

View File

@ -181,12 +181,10 @@ void VertexManager::vFlush(bool useDstAlpha)
PrepareDrawBuffers(stride);
if (!bpmem.genMode.zfreeze && IndexGenerator::GetIndexLen() >= 3)
{
if (!bpmem.genMode.zfreeze)
CalculateZSlope(stride);
}
// if cull mode is CULL_ALL, ignore triangles and quads
// If cull mode is CULL_ALL, do not render these triangles
if (bpmem.genMode.cullmode == GenMode::CULL_ALL && current_primitive_type == PRIMITIVE_TRIANGLES)
return;
@ -202,6 +200,9 @@ void VertexManager::ResetBuffer(u32 stride)
{
s_pCurBufferPointer = s_pBaseBufferPointer;
IndexGenerator::Start(GetIndexBuffer());
if (bpmem.genMode.zfreeze)
PixelShaderManager::SetZSlope(ZSlope.dfdx, ZSlope.dfdy, ZSlope.f0);
}
} // namespace