Skip to content

Commit

Permalink
Software renderer clipper: Don't clip on the sides. Fixes #4845 and s…
Browse files Browse the repository at this point in the history
…hould fix #7124 for the SW renderer.
  • Loading branch information
hrydgard committed Aug 16, 2020
1 parent 20eef07 commit 2e06386
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions GPU/Software/Clipper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,11 @@ void ProcessTriangle(VertexData& v0, VertexData& v1, VertexData& v2, const Verte
indices[1] = SKIP_FLAG;
indices[2] = SKIP_FLAG;

POLY_CLIP(CLIP_POS_X_BIT, -1, 0, 0, 1);
POLY_CLIP(CLIP_NEG_X_BIT, 1, 0, 0, 1);
POLY_CLIP(CLIP_POS_Y_BIT, 0, -1, 0, 1);
POLY_CLIP(CLIP_NEG_Y_BIT, 0, 1, 0, 1);
// The PSP doesn't clip on the sides (so, commented out) but it does appear to have a Z clipper.
// POLY_CLIP(CLIP_POS_X_BIT, -1, 0, 0, 1);
// POLY_CLIP(CLIP_NEG_X_BIT, 1, 0, 0, 1);
// POLY_CLIP(CLIP_POS_Y_BIT, 0, -1, 0, 1);
// POLY_CLIP(CLIP_NEG_Y_BIT, 0, 1, 0, 1);
POLY_CLIP(CLIP_POS_Z_BIT, 0, 0, 0, 1);
POLY_CLIP(CLIP_NEG_Z_BIT, 0, 0, 1, 1);

Expand Down

0 comments on commit 2e06386

Please sign in to comment.