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

Persist framebuffer backing CLUT data to GS memory #1075

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kernle32dll
Copy link
Contributor

Dragonball Z Tenkaichi 2 renders its CLUT information into a framebuffer, and then tries to use it from there. This works for Vulkan, but for OpenGL the framebuffer content is never propagated back into the GS RAM, and thus unavailable when the CLUT information is required.

This PR uses a light-weight approach of reading framebuffer contents when required for CLUT calculation, and persists it (if not already done so). This works pretty well, and only decreases performance marginally.

Special note on the "downSample" part. For whatever reason, on resolution upscaling > 1 I got artifacts in the CLUT rendering. I don't know why, but down-sampling it in GPU memory again helped clear the issues.

@kernle32dll kernle32dll changed the title Persist framebuffer nacking CLUT data to GS memory Persist framebuffer backing CLUT data to GS memory Jun 3, 2021
@kernle32dll
Copy link
Contributor Author

Master:
Screenshot from 2021-06-04 01-43-42

PR:
Screenshot from 2021-06-04 01-36-41

@kernle32dll kernle32dll force-pushed the framebuffer-clut-2 branch 2 times, most recently from ee616e0 to a4c484a Compare June 4, 2021 18:13
@kernle32dll kernle32dll marked this pull request as draft June 4, 2021 18:15
@Bogdans29
Copy link

Is Vulkan supported on android?

@kernle32dll kernle32dll force-pushed the framebuffer-clut-2 branch 2 times, most recently from 871f747 to d9c9be9 Compare June 8, 2021 08:16
@ghost
Copy link

ghost commented Jul 21, 2021

Any updates about this?

Required by DBZ Budokai Tenkaichi 2 for CLUT rendering of characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants