From 21064edfca4f8299b4e288ef6f190240be12620e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 13 Nov 2022 09:17:29 -0800 Subject: [PATCH] softgpu: Correct tex on fogged rectangles. --- GPU/Software/Clipper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU/Software/Clipper.cpp b/GPU/Software/Clipper.cpp index e9ad7ec5b4..11db812e1a 100644 --- a/GPU/Software/Clipper.cpp +++ b/GPU/Software/Clipper.cpp @@ -208,10 +208,13 @@ void ProcessRect(const ClipVertexData &v0, const ClipVertexData &v1, BinManager // TODO: Check exactness of middle. VertexData vhalf0 = v1.v; vhalf0.screenpos.x = v0.v.screenpos.x + (v1.v.screenpos.x - v0.v.screenpos.x) / 2; + vhalf0.texturecoords.x = v0.v.texturecoords.x + (v1.v.texturecoords.x - v0.v.texturecoords.x) / 2; VertexData vhalf1 = v1.v; vhalf1.screenpos.x = v0.v.screenpos.x + (v1.v.screenpos.x - v0.v.screenpos.x) / 2; vhalf1.screenpos.y = v0.v.screenpos.y; + vhalf1.texturecoords.x = v0.v.texturecoords.x + (v1.v.texturecoords.x - v0.v.texturecoords.x) / 2; + vhalf1.texturecoords.y = v0.v.texturecoords.y; VertexData vrev1 = v1.v; vrev1.fogdepth = v0.v.fogdepth;