Merge pull request #16385 from unknownbrackets/softgpu-rect

softgpu: Fix off-by-one rendering after half-pixel
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2022-11-13 21:01:15 +01:00
commit 2e6a19fadc
1 file changed
+1 -1
+1 -1
View File
@@ -893,7 +893,7 @@ void DrawRectangle(const VertexData &v0, const VertexData &v1, const BinCoords &
#endif
for (int64_t curY = minY; curY <= maxY; curY += SCREEN_SCALE_FACTOR * 2, rowST += sty) {
DrawingCoords p = TransformUnit::ScreenToDrawing(range.x1, curY);
DrawingCoords p = TransformUnit::ScreenToDrawing(minX, curY);
int scissorY2 = curY + SCREEN_SCALE_FACTOR > maxY ? -1 : 0;
Vec4<int> scissor_mask = Vec4<int>(0, maxX - minX - SCREEN_SCALE_FACTOR, scissorY2, (maxX - minX - SCREEN_SCALE_FACTOR) | scissorY2);