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

GS/HW: Allow conversion from 32bit to 24bit depth #11476

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented Jun 27, 2024

Description of Changes

Truncates depth buffers from 32bit to 24bit values when a game requests to read depth as 24bit.

Rationale behind Changes

We store depth as a normalized 0-1 value, so when a game swaps to 24bit it still retains what would normally be the upper 8 bits of the depth buffer. In the case of Harry Potter it expects this top 8 bits to be gone, and it messes up handling of the post processing.

Also added upscaling fixes to said game so it doesn't look sucky when upscaled.

Suggested Testing Steps

Dump run said it was fine, test Harry Potter - Quidditch World Cup. Also try Superman Returns and X-Men - Wolverine's Revenge as they showed up in the dump run as probably hitting this code (have tried them, no noticable difference).

TODO: Need to do DX, OGL, Metal

You can test this dump:
Harry Potter - Quidditch World Cup_SLUS-20769_20240626200416.gs.zip

Master:
image
PR:
image

@refractionpcsx2 refractionpcsx2 changed the title GS/HW: Allow conversion from 32bit to 24 bit depth GS/HW: Allow conversion from 32bit to 24bit depth Jun 27, 2024
@refractionpcsx2 refractionpcsx2 force-pushed the gs_32bit24bitdepthconv branch from 14c6d56 to 13d1c2b Compare June 27, 2024 19:02
@refractionpcsx2 refractionpcsx2 force-pushed the gs_32bit24bitdepthconv branch from 13d1c2b to 651b7b2 Compare June 27, 2024 19:37
@refractionpcsx2 refractionpcsx2 force-pushed the gs_32bit24bitdepthconv branch 2 times, most recently from 3686573 to fe9bee5 Compare June 27, 2024 20:04
@refractionpcsx2 refractionpcsx2 force-pushed the gs_32bit24bitdepthconv branch from fe9bee5 to c324733 Compare June 27, 2024 21:33
@refractionpcsx2 refractionpcsx2 force-pushed the gs_32bit24bitdepthconv branch 2 times, most recently from 2db5516 to 7c8e79f Compare June 27, 2024 23:24
@refractionpcsx2 refractionpcsx2 force-pushed the gs_32bit24bitdepthconv branch from 7c8e79f to bdb1f7f Compare June 27, 2024 23:28
@DigitalMajestic
Copy link
Contributor

dump lgtm on metal

@refractionpcsx2 refractionpcsx2 merged commit 56f32ff into master Jun 28, 2024
24 checks passed
@lightningterror lightningterror deleted the gs_32bit24bitdepthconv branch July 8, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants