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

Correct DXT5 alpha calculation #14838

Merged
merged 2 commits into from
Sep 12, 2021
Merged

Correct DXT5 alpha calculation #14838

merged 2 commits into from
Sep 12, 2021

Conversation

unknownbrackets
Copy link
Collaborator

For a while, alpha values have been slightly wrong (typically just off by one) for some DXT5 textures.

More of a correctness fix, but this adjusts the weighting to match PSP texture decoding per tests. Also made softgpu decode one pixel at a time, which improved #14168 from 25% to 30% (could still implement in samplerjit now that it's accurate.)

-[Unknown]

This matches PSP alpha values from an exhaustive test.
This improves performance a lot compared to decoding the whole block.
Eventually we may implement a cache, but threading makes that complex to
make properly fast.
@hrydgard hrydgard added GE emulation Backend-independent GPU issues Software Rasterizer labels Sep 12, 2021
@hrydgard hrydgard added this to the v1.12.0 milestone Sep 12, 2021
@hrydgard hrydgard merged commit 4fb7b0a into hrydgard:master Sep 12, 2021
@unknownbrackets unknownbrackets deleted the dxt5 branch September 12, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues Software Rasterizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants