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

Depth texture support - let's collect the games (and GE dumps if available) #13256

Open
hrydgard opened this issue Aug 6, 2020 · 14 comments
Open
Labels
Depth Texture An effect needs texturing from depth buffers. GE emulation Backend-independent GPU issues

Comments

@hrydgard
Copy link
Owner

hrydgard commented Aug 6, 2020

Some games use depth buffers as textures, generally through CLUT16 or CLUT32, so they can look up the depth value in a palette to perform various effects like custom fog, depth of field etc.

Usually they access the depth buffer through address 0x042xxxxx - that 2 tells the memory controller to swizzle around the data from the depth swizzle to the texture swizzle - so these accesses are actually quite quick to detect.

I plan to add support for this, so let's collect the games that do this - ideally by linking to an issue that has GE frame dumps.

One complication is that we remap the depth buffer a bit through the projection matrix (to simulate some kinds of clipping and precision). To read back values, we need to run them through the inverse function before we use them.

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Aug 6, 2020
@hrydgard hrydgard added this to the v1.11.0 milestone Aug 6, 2020
@Panderner
Copy link
Contributor

Panderner commented Aug 6, 2020

How about Ford Bold Moves Street Racing Fog Effect? (#12294)

(Edit: #13262 fixes fog graphic issue for Vulkan but not OpenGL)

@hrydgard
Copy link
Owner Author

hrydgard commented Aug 6, 2020

I am not sure about that one - it could be one, haven't investigated yet. But thanks for the reminder.

@hrydgard hrydgard added the Depth / Z Issue involves depth drawing parameters. label Aug 6, 2020
@DonelBueno
Copy link

I don't think this is related, but maybe it is: #10229

@hrydgard
Copy link
Owner Author

hrydgard commented Aug 9, 2020

Not likely, but it's also a depth problem indeed.

@nassau-tk
Copy link
Contributor

Can I do an amateur question?

Briefly speaking, if something in which drawing before and behind the object isn't right is found, should it be reported?

@hrydgard
Copy link
Owner Author

@nassau-tk If it renders wrong, it should be in an issue. Whether it belongs in this one or not is hard to say though - show some pictures.

@nassau-tk
Copy link
Contributor

nassau-tk commented Sep 13, 2020

@hrydgard

Thank you for teach for me!
Please,see attached screenshot and dump.

[Minna no Sukkiri (Eng:Everybody Stress Buster)]
UCJS10094_0001.zip
[Real PSP]
everybodystress_RealPSP

[PPSSPP]
everybodystress_PPSSPP

[Maybe,These type dialog are drawing with blur processing on background.]
These dialog are "Autosave warnig".
everybodystress_autosavedialog01

everybodystress_autosavedialog02

Is this a not related?

@nassau-tk
Copy link
Contributor

@hrydgard

And, #6979 is not related?

@hrydgard
Copy link
Owner Author

I'll check the dumps later. It's possible that it's related though would be a little bit surprising if they used depth texturing for simple menu effects. Could also be some other kind of bug.

@nassau-tk
Copy link
Contributor

Related #12626

@Panderner
Copy link
Contributor

@hrydgard It's #12294 not #12994

@Panderner
Copy link
Contributor

Panderner commented Jan 3, 2021

Current status of Silent Hill games as we mentioned in #6265 and #8497 in v1.10.3-1459-g678d881a1:

Shattered Memories:

OpenGL:
Screenshot_2021-01-03-14-53-39-864_org ppsspp ppsspp

Vulkan:
Screenshot_2021-01-03-14-53-53-568_org ppsspp ppsspp

GE Dump:
ULUS10450_0001.zip

Origins:

OpenGL:
Screenshot_2021-01-03-14-44-12-021_org ppsspp ppsspp

Vulkan:
Screenshot_2021-01-03-14-44-23-211_org ppsspp ppsspp

GE dump:
ULUS10285_0001.zip

hrydgard added a commit that referenced this issue Jan 31, 2021
…now.

Need to figure out what to do about other Z mappings.

Helps #6411 for OpenGL on desktop primarily, and certain other games affected by #13256
are likely working too like the fog in Harry Potter.
@nassau-tk
Copy link
Contributor

Got a [Depth / Z] label #13950 .

@hrydgard
Copy link
Owner Author

Yes, but it's not a depth texture issue.

hrydgard added a commit that referenced this issue Jul 9, 2021
…now.

Need to figure out what to do about other Z mappings.

Helps #6411 for OpenGL on desktop primarily, and certain other games affected by #13256
are likely working too like the fog in Harry Potter.
@hrydgard hrydgard modified the milestones: v1.12.0, Future Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Depth Texture An effect needs texturing from depth buffers. GE emulation Backend-independent GPU issues
Projects
None yet
Development

No branches or pull requests

4 participants