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

@ -89,6 +89,9 @@ void VertexManager::ResetBuffer(u32 stride)
buffer = s_indexBuffer->Map(MAXIBUFFERSIZE * sizeof(u16));
IndexGenerator::Start((u16*)buffer.first);
s_index_offset = buffer.second;
if (bpmem.genMode.zfreeze)
PixelShaderManager::SetZSlope(ZSlope.dfdx, ZSlope.dfdy, ZSlope.f0);
}
void VertexManager::Draw(u32 stride)
@ -140,12 +143,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;