From a95adcb999fdb8fe6a66edc98f50ca341a395495 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 9 Aug 2016 15:14:13 +0200 Subject: [PATCH] gsdx-ogl: correct texture coordinate by 0.5 when vertex position is -0.5 Avoid ghosting in Captain tsubasa --- plugins/GSdx/GSRendererOGL.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index ce85ece8b3..64cc516194 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -760,6 +760,9 @@ void GSRendererOGL::RealignTargetTextureCoordinate(const GSTextureCache::Source* } else if (linear && t_position == 16) { half_offset.x = 16; half_offset.y = 16; + } else if (m_vt.m_min.p.x == -0.5f) { + half_offset.x = 8; + half_offset.y = 8; } } else { if (!linear && t_position == 8) { @@ -768,6 +771,9 @@ void GSRendererOGL::RealignTargetTextureCoordinate(const GSTextureCache::Source* } else if (linear && t_position == 16) { half_offset.x = 16 - 16 / scale.x; half_offset.y = 16 - 16 / scale.y; + } else if (m_vt.m_min.p.x == -0.5f) { + half_offset.x = 8; + half_offset.y = 8; } }