Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsdx: implement fixed TEX0 for all renderers #2855

Merged
merged 4 commits into from Feb 20, 2019

Conversation

Projects
None yet
3 participants
@gregory38
Copy link
Contributor

commented Feb 13, 2019

It shall fix lupin texture for hw renderer. 007 Nightfire is also fixed.

Closes #258

@gregory38

This comment has been minimized.

Copy link
Contributor Author

commented Feb 13, 2019

issue #695

@gregory38

This comment has been minimized.

Copy link
Contributor Author

commented Feb 13, 2019

Hum reading back the issue. I'm afraid of corner case that will break (namely floating point coordinate).

@gregory38 gregory38 force-pushed the greg/gsdx-lupin-take2 branch from 2c4d465 to 56fb3f4 Feb 15, 2019

@lightningterror lightningterror added this to the Release 1.6 milestone Feb 17, 2019

@lightningterror

This comment has been minimized.

Copy link
Member

commented Feb 18, 2019

@gregory38 here are the gsdumps from me and prafull.
Lupin 3rd Issues.zip

@gregory38

This comment has been minimized.

Copy link
Contributor Author

commented Feb 18, 2019

@lightningterror
Could you test that for bilinear ? Try to play with it :)

diff --git a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
index c4ed344e3..689cbf668 100644
--- a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
+++ b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
@@ -845,6 +845,9 @@ void GSRendererOGL::EmulateTextureSampler(const GSTextureCache::Source* tex)
        tw = (int)(1 << m_context->stack.TEX0.TW);
        th = (int)(1 << m_context->stack.TEX0.TH);
        ps_cb.WH = GSVector4(tw, th, w, h);
+
+       //
+       ps_cb.HalfTexel = GSVector4(-0.5f, 0.5f).xxyy() / WH.xyxy();
    }
 
    // Only enable clamping in CLAMP mode. REGION_CLAMP will be done manually in the shader
@gregory38

This comment has been minimized.

Copy link
Contributor Author

commented Feb 18, 2019

Or maybe use ps_cb.WH

@gregory38

This comment has been minimized.

Copy link
Contributor Author

commented Feb 18, 2019

Please don't merge it !

I only pushed it for testing and backup. I will likely implement those commits differently.

@gregory38 gregory38 force-pushed the greg/gsdx-lupin-take2 branch 2 times, most recently from ceb6282 to 35a6396 Feb 20, 2019

@lightningterror lightningterror force-pushed the greg/gsdx-lupin-take2 branch 2 times, most recently from e2184e7 to d1304c4 Feb 20, 2019

@lightningterror lightningterror force-pushed the greg/gsdx-lupin-take2 branch from d1304c4 to 094be42 Feb 20, 2019

@lightningterror lightningterror merged commit e55fcae into master Feb 20, 2019

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@lightningterror lightningterror deleted the greg/gsdx-lupin-take2 branch Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.