Software renderer clipper: Don't clip on the sides. Fixes #4845 and should fix #7124 for the SW renderer.

This commit is contained in:
Henrik Rydgård 2020-08-16 21:38:07 +02:00
parent 20eef073b4
commit 2e06386cf6

View file

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