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

Handle Transparency modes better in the GPU #46

Open
Amjad50 opened this issue Sep 25, 2023 · 0 comments
Open

Handle Transparency modes better in the GPU #46

Amjad50 opened this issue Sep 25, 2023 · 0 comments

Comments

@Amjad50
Copy link
Owner

Amjad50 commented Sep 25, 2023

One of the things that impact performance the most is the use of different types of semi-transparency modes, especially mode=3. Some of these games are Need for Speed - High Stakes
Its bad because it leads to us flushing the drawing buffer and calling vkDraw for every polygon for example, which is very bad.

Currently, we are batching by several parameters and one of them is the semi-transparency-mode

I think a good approach is to optimize this is to batch multiple draws from different semi-transparency-mode.

One idea to do this is to use 2 back-images and switch between them on every batch, and handle all semi-transparency inside the shaders.
We can batch multiple draws that don't intersect. Of course this could be easily defeated if some games draw triangles on top of each other a lot of the times.
This may not be perfect, but we can check and see which works better.

@Amjad50 Amjad50 added this to PSX Sep 25, 2023
@github-project-automation github-project-automation bot moved this to In progress in PSX Sep 25, 2023
@Amjad50 Amjad50 moved this from In progress to To do in PSX Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

1 participant