From ea36554c6a0576e973973d2a6d381fa60f0f3d9d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 10 May 2015 14:37:14 -0700 Subject: [PATCH] software: Examine v0/v1 for uv rotation. If we determine tl/br heuristically, it can never rotate correctly. Anyway, this still is not rotating correctly... --- GPU/Software/Clipper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Software/Clipper.cpp b/GPU/Software/Clipper.cpp index 522ced9755..c1d6c1b3b8 100644 --- a/GPU/Software/Clipper.cpp +++ b/GPU/Software/Clipper.cpp @@ -125,7 +125,7 @@ static inline int CalcClipMask(const ClipCoords& v) } \ } -static void RotateUVThrough(VertexData &tl, VertexData &tr, VertexData &bl, VertexData &br) { +static void RotateUVThrough(const VertexData &tl, const VertexData &br, VertexData &tr, VertexData &bl) { const fixed16 x1 = tl.screenpos.x; const fixed16 x2 = br.screenpos.x; const fixed16 y1 = tl.screenpos.y; @@ -211,7 +211,7 @@ void ProcessRect(const VertexData& v0, const VertexData& v1) bottomright = &buf[i]; } - RotateUVThrough(*topleft, *topright, *bottomleft, *bottomright); + RotateUVThrough(v0, v1, *topright, *bottomleft); // Four triangles to do backfaces as well. Two of them will get backface culled. Rasterizer::DrawTriangle(*topleft, *topright, *bottomright);