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

GS/HW: Use proper alpha min max for palettes when looking up a source, adjust dither on blend mix. #12081

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

lightningterror
Copy link
Contributor

@lightningterror lightningterror commented Dec 12, 2024

Description of Changes

GS/TC: Use proper alpha min max for palettes when looking up a source.
If it's an old source made from target make sure it isn't a palette, alphas need to be used from the palette then.

GS/HW: Adjust how we handle dithering on blend mix.
Allow dither adjust regardless of alpha. usually it is clamed to 1 anyway so we can expand it if alpha max is higher than 128.
Expand dither adjust to work in rev subtract conditions.

Rationale behind Changes

Accuracy.

Suggested Testing Steps

Test variety of games, dumb runner didn't show anything broken on dx11 and vk, some comparisons are below.

If it's an old source made from target make sure it isn't a palette, alphas need to be used from the palette then.
Allow dither adjust regardless of alpha. usually it is clamed to 1 anyway so we can expand it if alpha max is higher than 128.

Expand dither adjust to work in rev subtract conditions.
@lightningterror lightningterror changed the title GS/TC: Use proper alpha min max for palettes when looking up a source. GS/HW: Use proper alpha min max for palettes when looking up a source, adjust dither on blend mix. Dec 12, 2024
@lightningterror
Copy link
Contributor Author

lightningterror commented Dec 12, 2024

Some improvements comparisons on Vulkan with basic blending:
Champions Return to Arms:
Master:
image
PR:
image

Driv3r:
Master:
image
PR:
image

Baldur's Gate Dark Alliance:
Master:
image
PR:
image

@lightningterror lightningterror merged commit 7d16a91 into master Dec 13, 2024
22 checks passed
@lightningterror lightningterror deleted the gs_alphaminmax_palettes branch December 13, 2024 07:27
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.

1 participant