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

Fix incorrect ASTC endpoint color when using LuminanceDelta mode #4890

Merged
merged 1 commit into from May 11, 2023

Conversation

gdkchan
Copy link
Member

@gdkchan gdkchan commented May 11, 2023

This fixes a bug on the ASTC decoder that caused some ASTC texture to be corrupt and have white pixels where they shouldn't. Only affects GPUs that don't support ASTC natively (which is pretty much everything other than Apple Silicon and old Intel integrated GPUs).

Reference form the official decoder: https://github.com/ARM-software/astc-encoder/blob/0a3269f9de2b457dbeb7c5c6265e96c45b64647c/Source/astcenc_color_unquantize.cpp#L229

This fixes some texture corruption in The Legend of Zelda: Tears of the Kingdom.
Before:
image
After:
image

@gdkchan gdkchan added gpu Related to Ryujinx.Graphics fix Fix something labels May 11, 2023
@gdkchan gdkchan requested a review from marysaka May 11, 2023 18:17
Copy link
Member

@riperiperi riperiperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only everything were this simple.

Copy link
Member

@AcK77 AcK77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@AcK77 AcK77 merged commit 0ed40c7 into Ryujinx:master May 11, 2023
8 checks passed
@gdkchan gdkchan deleted the fix-astc-luma-delta branch May 11, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something gpu Related to Ryujinx.Graphics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants