Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Software renderer: Add a zfreeze related TODO.
  • Loading branch information
neobrain committed Dec 30, 2013
1 parent a5bfdbf commit bbde075
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Core/VideoBackends/Software/Src/Rasterizer.cpp
Expand Up @@ -385,6 +385,10 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
float w[3] = { 1.0f / v0->projectedPosition.w, 1.0f / v1->projectedPosition.w, 1.0f / v2->projectedPosition.w };
InitSlope(&WSlope, w[0], w[1], w[2], fltdx31, fltdx12, fltdy12, fltdy31);

// TODO: The zfreeze emulation is not quite correct, yet!
// Many things might prevent us from reaching this line (culling, clipping, scissoring).
// However, the zslope is always guaranteed to be calculated unless all vertices are trivially rejected during clipping!
// We're currently sloppy at this since we abort early if any of the culling/clipping/scissoring tests fail.
if (!bpmem.genMode.zfreeze || !g_SWVideoConfig.bZFreeze)
InitSlope(&ZSlope, v0->screenPosition[2], v1->screenPosition[2], v2->screenPosition[2], fltdx31, fltdx12, fltdy12, fltdy31);

Expand Down

0 comments on commit bbde075

Please sign in to comment.