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

Fix D3D Real XFB texture sampling. #700

Merged
merged 1 commit into from
Aug 2, 2014
Merged

Fix D3D Real XFB texture sampling. #700

merged 1 commit into from
Aug 2, 2014

Conversation

nyanpasu64
Copy link
Contributor

Under the current D3D Real XFB system (which I don't really understand), when the texture lookup takes place, the x-coordinates passed in (x.5) are multiplied by 2, resulting in looking up each pixel about half a pixel too far to the right. This causes graphical errors on NVIDIA hardware due to every fifth column rounding up and choosing the wrong pixel. This fork compensates for incorrect texture coordinates by subtracting one half afterwards.

@degasus
Copy link
Member

degasus commented Jul 30, 2014

LGTM

@MayImilae
Copy link
Contributor

I assume this is meant to address https://code.google.com/p/dolphin-emu/issues/detail?id=6503? The description isn't very clear on this.

@degasus
Copy link
Member

degasus commented Jul 30, 2014

@MaJoRoesch Yes, it's exactly this issue.

@degasus
Copy link
Member

degasus commented Jul 30, 2014

@dolphin-emu-bot rebuild

@MayImilae
Copy link
Contributor

Tested and confirmed - this build fixes issue 6503.

@Tilka
Copy link
Member

Tilka commented Jul 30, 2014

Might be related to this bug: https://code.google.com/p/dolphin-emu/issues/detail?id=7193

@degasus
Copy link
Member

degasus commented Jul 30, 2014

@Tilka I don't think so. It may be the same kind of issue, but in other shaders. This PR only touch the d3d real xfb shader, so it won't affect anything which doesn't use real xfb at all.

@phire
Copy link
Member

phire commented Aug 2, 2014

Could someone test this on AMD?

If it doesn't cause any issues, I think this can be merged.

@JMC47
Copy link
Contributor

JMC47 commented Aug 2, 2014

Works fine on my AMD Radeon 5850

Sonicadvance1 added a commit that referenced this pull request Aug 2, 2014
Fix D3D Real XFB texture sampling.
@Sonicadvance1 Sonicadvance1 merged commit 7e83a0e into dolphin-emu:master Aug 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants