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-d3d: Add support for Channel Shuffle on Direct3D11 #2745

Merged
merged 9 commits into from Dec 13, 2018

Conversation

Projects
None yet
3 participants
@lightningterror
Copy link
Member

commented Dec 11, 2018

Note the feature is still not yet complete, copy function needs to be
implemented (suggested by Gregory) but it can be done at a later date,
this still fixes a bunch of issues on various games even in it's current state.

Related: #1318

@lightningterror lightningterror force-pushed the lightningterror:channel-shuffle-v4 branch 2 times, most recently from c09570e to 8b197a4 Dec 11, 2018

@lightningterror lightningterror added this to the Release 1.6 milestone Dec 11, 2018

@lightningterror lightningterror force-pushed the lightningterror:channel-shuffle-v4 branch 2 times, most recently from 282065c to 0245c97 Dec 11, 2018

@gregory38

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2018

Please implement properly the blue/green effect. You just need to extend the ps constant buffer. It should be trivial

@lightningterror lightningterror force-pushed the lightningterror:channel-shuffle-v4 branch 3 times, most recently from 4faa9d6 to 2322dd7 Dec 11, 2018

KrossX and others added some commits Dec 11, 2018

tfx.fx: Port channel shuffle shaders from OpenGL.
Port RGBA shaders to support channel shuffle on Direct3D11.
GSdx-d3d11: Add the shader fetch in GSTextureFX11.
Allows us to fetch the channel from the tfx shader.
GSdx-d3d: Add support for channel shuffle in GSRendererDX.
Split the code from GSRendererDX to GSRendererDX9 and GSRendererDX11. We
ensure d3d9 doesn't blow up with regressions, add required code to
GSRendererDX11 to properly support channel shuffle.

Note the feature is still not yet complete, copy function needs to be
implemented (suggested by Gregory) but it can be done at a later date,
this still fixes a bunch of issues on various games.

@lightningterror lightningterror force-pushed the lightningterror:channel-shuffle-v4 branch from 322b1ca to 6708041 Dec 12, 2018

@gregory38

This comment has been minimized.

Copy link
Contributor

commented on 6708041 Dec 12, 2018

If Emulate Channel function is virtual. You can keep it in common code as a fallback implementation.
You just need to override it in dx11. It would reduce the move of code that will be deleted soon anyway

This comment has been minimized.

Copy link
Member Author

replied Dec 12, 2018

It's honestly fine as it is, we will need to move around a lot of code when dx9 gets purged anyway.

@lightningterror lightningterror force-pushed the lightningterror:channel-shuffle-v4 branch from df06d80 to f7e81fd Dec 12, 2018

lightningterror added some commits Dec 12, 2018

GSdx-d3d11: Add support for depth convert format in texture sampler.
Idea is to allot partial support of depth fmt on the new depth convert
format, this way we can utilize channel shuffle on Red, Blue or gXbY
channels with depth shader conversion.

Terminator 3 hits this code path and seems to fix a transparent wall.
Other games will probably benefit from this as well.

@lightningterror lightningterror force-pushed the lightningterror:channel-shuffle-v4 branch from f7e81fd to 1485d02 Dec 12, 2018

@lightningterror

This comment has been minimized.

Copy link
Member Author

commented Dec 13, 2018

I checked the code a couple of times and everything seems a ok, also Greg reviewed it several times so it should be good as well.

I think that's as much as we can do for the scope of this pr, time for users to get another early Christmas present.

I think it's also possible to include Urban Chaos and Tales of Abyss hle without full depth fmt implementation, that's what I'm working on now.

@lightningterror lightningterror merged commit 50b71f6 into PCSX2:master Dec 13, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@lightningterror lightningterror deleted the lightningterror:channel-shuffle-v4 branch Dec 13, 2018

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.