mirror of https://github.com/PCSX2/pcsx2.git
GS: Provide HPO Normal offsets when there is no RT.
This commit is contained in:
parent
786eedf2f2
commit
3a193956ff
|
@ -4074,16 +4074,32 @@ void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Target*
|
|||
const float oy = static_cast<float>(static_cast<int>(m_context->XYOFFSET.OFY));
|
||||
float ox2 = -1.0f / rtsize.x;
|
||||
float oy2 = -1.0f / rtsize.y;
|
||||
|
||||
float mod_xy = 0.0f;
|
||||
//This hack subtracts around half a pixel from OFX and OFY.
|
||||
//
|
||||
//The resulting shifted output aligns better with common blending / corona / blurring effects,
|
||||
//but introduces a few bad pixels on the edges.
|
||||
|
||||
if (rt && rt->OffsetHack_modxy > 1.0f)
|
||||
if (!rt)
|
||||
{
|
||||
ox2 *= rt->OffsetHack_modxy;
|
||||
oy2 *= rt->OffsetHack_modxy;
|
||||
if (GSConfig.UserHacks_HalfPixelOffset == 1)
|
||||
{
|
||||
mod_xy = g_gs_renderer->GetUpscaleMultiplier();
|
||||
switch (static_cast<int>(std::round(g_gs_renderer->GetUpscaleMultiplier())))
|
||||
{
|
||||
case 2: case 4: case 6: case 8: mod_xy += 0.2f; break;
|
||||
case 3: case 7: mod_xy += 0.1f; break;
|
||||
case 5: mod_xy += 0.3f; break;
|
||||
default: mod_xy = 0.0f; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
mod_xy = rt->OffsetHack_modxy;
|
||||
|
||||
if (mod_xy > 1.0f)
|
||||
{
|
||||
ox2 *= mod_xy;
|
||||
oy2 *= mod_xy;
|
||||
}
|
||||
|
||||
m_conf.cb_vs.vertex_scale = GSVector2(sx, sy);
|
||||
|
|
Loading…
Reference in New Issue