Merge pull request #1485 from ssakash/HPO_Custom

GSDX-TextureCache: Port Half pixel offset hack for custom resolutions
This commit is contained in:
Gregory Hainaut 2016-07-29 15:07:02 +02:00 committed by GitHub
commit 242ac26299
1 changed files with 8 additions and 0 deletions

View File

@ -1329,6 +1329,14 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
{ {
switch(m_renderer->GetUpscaleMultiplier()) switch(m_renderer->GetUpscaleMultiplier())
{ {
case 0: //Custom Resolution
{
const float offset = 0.2f;
modx = dst->m_texture->GetScale().x + offset;
mody = dst->m_texture->GetScale().y + offset;
dst->m_texture->LikelyOffset = true;
break;
}
case 2: modx = 2.2f; mody = 2.2f; dst->m_texture->LikelyOffset = true; break; case 2: modx = 2.2f; mody = 2.2f; dst->m_texture->LikelyOffset = true; break;
case 3: modx = 3.1f; mody = 3.1f; dst->m_texture->LikelyOffset = true; break; case 3: modx = 3.1f; mody = 3.1f; dst->m_texture->LikelyOffset = true; break;
case 4: modx = 4.2f; mody = 4.2f; dst->m_texture->LikelyOffset = true; break; case 4: modx = 4.2f; mody = 4.2f; dst->m_texture->LikelyOffset = true; break;