From 01c879be14a648f42ffdae3989ee36e393fd40ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 1 Oct 2026 09:42:58 -0600 Subject: [PATCH] SoftGPU: Only take the 1:1 sprite shortcut with nearest filtering DrawSprite samples texel centers, but the GE's sprite UV planes usually land slightly off them, which bilinear filtering shows: on most sprite sizes every pixel blends its neighbors (gpu/probe exp87). Bilinear sprites now go through the plane path. Gallery Fake's dump becomes bit exact. Co-Authored-By: Claude Opus 5.5 (1M context) --- GPU/Software/RasterizerRectangle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GPU/Software/RasterizerRectangle.cpp b/GPU/Software/RasterizerRectangle.cpp index dd295243c0..025edf0485 100644 --- a/GPU/Software/RasterizerRectangle.cpp +++ b/GPU/Software/RasterizerRectangle.cpp @@ -531,6 +531,8 @@ bool RectangleFastPath(const VertexData &v0, const VertexData &v1, BinManager &b bool coord_check = true; if (state.enableTextures) { state_check = state_check && NoClampOrWrap(state, v0.texturecoords.uv()) && NoClampOrWrap(state, v1.texturecoords.uv()); + // DrawSprite samples texel centers, but bilinear 1:1 sprites don't land on them (gpu/probe exp87). + state_check = state_check && !state.minFilt && !state.magFilt; coord_check = (xdiff == udiff || xdiff == -udiff) && (ydiff == vdiff || ydiff == -vdiff); } // This doesn't work well with offset drawing, see #15876. Through never has a subpixel offset.