mirror of https://github.com/PCSX2/pcsx2.git
GS: Fix half pixel offset normal upscaling above 8x.
This commit is contained in:
parent
06c9c60717
commit
404824e69e
|
@ -257,21 +257,22 @@ GSVector2i GSRenderer::GetInternalResolution()
|
||||||
|
|
||||||
float GSRenderer::GetModXYOffset()
|
float GSRenderer::GetModXYOffset()
|
||||||
{
|
{
|
||||||
float mod_xy = 0.0f;
|
|
||||||
|
|
||||||
if (GSConfig.UserHacks_HalfPixelOffset == GSHalfPixelOffset::Normal)
|
if (GSConfig.UserHacks_HalfPixelOffset == GSHalfPixelOffset::Normal)
|
||||||
{
|
{
|
||||||
mod_xy = GetUpscaleMultiplier();
|
float mod_xy = GetUpscaleMultiplier();
|
||||||
switch (static_cast<int>(std::round(mod_xy)))
|
const int rounded_mod_xy = static_cast<int>(std::round(mod_xy));
|
||||||
|
if (rounded_mod_xy > 1)
|
||||||
{
|
{
|
||||||
case 2: case 4: case 6: case 8: mod_xy += 0.2f; break;
|
if (!(rounded_mod_xy & 1))
|
||||||
case 3: case 7: mod_xy += 0.1f; break;
|
return mod_xy += 0.2f;
|
||||||
case 5: mod_xy += 0.3f; break;
|
else if (!(rounded_mod_xy & 2))
|
||||||
default: mod_xy = 0.0f; break;
|
return mod_xy += 0.3f;
|
||||||
|
else
|
||||||
|
return mod_xy += 0.1f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mod_xy;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static float GetCurrentAspectRatioFloat(bool is_progressive)
|
static float GetCurrentAspectRatioFloat(bool is_progressive)
|
||||||
|
|
Loading…
Reference in New Issue