From dc4f05d7c24c975a69f6d26afeaa5f716ce007f2 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Wed, 19 Aug 2009 01:08:40 +0000 Subject: [PATCH] GSdx: Initial pixel offsetting support via gsdx.ini. Use pixoff_x = somevalue and pixoff_y = somevalue. This can be used as a workaround for the various upscaling errors :) Try these values for Takes of the Abyss for example: pixoff_x=-8 pixoff_y=-8 git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1650 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSRendererDX.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSRendererDX.h b/plugins/GSdx/GSRendererDX.h index 0b8f9dc69f..8afeb2f9a1 100644 --- a/plugins/GSdx/GSRendererDX.h +++ b/plugins/GSdx/GSRendererDX.h @@ -31,6 +31,8 @@ class GSRendererDX : public GSRendererHW GSVector2 m_pixelcenter; bool m_logz; bool m_fba; + int m_pixoff_x; + int m_pixoff_y; protected: int m_topology; @@ -47,6 +49,8 @@ public: { m_logz = !!theApp.GetConfig("logz", 0); m_fba = !!theApp.GetConfig("fba", 1); + m_pixoff_x = theApp.GetConfig("pixoff_x", 0); + m_pixoff_y = theApp.GetConfig("pixoff_y", 0); } virtual ~GSRendererDX() @@ -167,8 +171,8 @@ public: float sx = 2.0f * rt->GetScale().x / (rt->GetWidth() << 4); float sy = 2.0f * rt->GetScale().y / (rt->GetHeight() << 4); - float ox = (float)(int)context->XYOFFSET.OFX; - float oy = (float)(int)context->XYOFFSET.OFY; + float ox = (float)(int)context->XYOFFSET.OFX + m_pixoff_x; + float oy = (float)(int)context->XYOFFSET.OFY + m_pixoff_y; float ox2 = 2.0f * m_pixelcenter.x / rt->GetWidth(); float oy2 = 2.0f * m_pixelcenter.y / rt->GetHeight();