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 authored and Scott Mansell committed 2015-01-23 03:32:31 +13:00
1 parent 6d5065c58d
commit add59b3bea
7 files changed
+52 -26

No files matched your search

@@ -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