From e4aef0a85b6cfc1e881c09c374a2d35823585870 Mon Sep 17 00:00:00 2001 From: Techjar Date: Fri, 28 May 2021 23:30:22 -0400 Subject: VideoCommon: Move bounding box pixel quads rounding to shader This avoids rounding values that the game writes to the bounding box registers, especially the default values. --- Source/Core/VideoBackends/Software/Tev.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/Software/Tev.cpp') diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index be6f14d610..3c932b9566 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -838,8 +838,10 @@ void Tev::Draw() EfbInterface::IncPerfCounterQuadCount(PQ_ZCOMP_OUTPUT); } - BoundingBox::Update(static_cast(Position[0]), static_cast(Position[0]), - static_cast(Position[1]), static_cast(Position[1])); + // The GC/Wii GPU rasterizes in 2x2 pixel groups, so bounding box values will be rounded to the + // extents of these groups, rather than the exact pixel. + BoundingBox::Update(static_cast(Position[0] & ~1), static_cast(Position[0] | 1), + static_cast(Position[1] & ~1), static_cast(Position[1] | 1)); #if ALLOW_TEV_DUMPS if (g_ActiveConfig.bDumpTevStages) -- cgit v1.2.3