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

A few more softgpu optimizations for alpha blend/test #16502

Merged
merged 2 commits into from
Dec 5, 2022

Conversation

unknownbrackets
Copy link
Collaborator

This forces alpha test off in more scenarios (it's still common to have a texture that contains no alpha, but has otherwise variable alpha) and forces alpha testing on when it could help skip a lot of alpha blending.

With these recent optimizations, the title screen of the GOW demo has crept from ~91% to ~97% speed on my machine. This one helped another couple percent, and helped a Red Star framedump I had by around ~4% (thought that was from ~165% already.)

-[Unknown]

Since we're already checking the CLUT, we can tell if it doesn't contain
zero alpha, in which case a != 0 test will never fail.  This is actually
pretty common, even when texture alpha is not always FF.
Blending is slow, and often games do effects like smoke, sun, etc. that
has a lot of zero alpha in them.  Many games do this with alpha testing
off, which is cheap compared to blending.
@hrydgard hrydgard added this to the v1.14.0 milestone Dec 5, 2022
@hrydgard hrydgard merged commit e969f9c into hrydgard:master Dec 5, 2022
@unknownbrackets unknownbrackets deleted the softgpu-opt branch December 5, 2022 14:56
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.

2 participants