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

[sfml] Multiply blend mode + non-PMA doesn't look correct on Celestial Circus #2507

Closed
jabuwu opened this issue Apr 25, 2024 · 1 comment
Closed

Comments

@jabuwu
Copy link

jabuwu commented Apr 25, 2024

Switching to "data/celestial-circus.atlas" here (removing -pma):

testcase(celestialCircus, "data/celestial-circus-pro.json", "data/celestial-circus-pro.skel", "data/celestial-circus-pma.atlas", 0.2f);

And setting this to false:

drawable->setUsePremultipliedAlpha(true);

The mouth, nose, and eyes render with white outlines:
Screen Shot 2024-04-25 at 4 29 53 AM

Any insight why this might be happening? Blend modes are a source of great confusion for me. I generally use PMA and encourage others to do the same, so it's not a big deal, just curious if it might be a bug or some interaction I'm not familiar with.

Thanks for your time!

@jabuwu jabuwu changed the title [sfml] Multiply blend mode + non-PMA doesn't look correct on Celestial Circius [sfml] Multiply blend mode + non-PMA doesn't look correct on Celestial Circus Apr 25, 2024
@badlogic
Copy link
Collaborator

The two slots in question use BlendMode:additive, which is defined like this in SFML

sf::BlendMode additive = sf::BlendMode(sf::BlendMode::SrcAlpha, sf::BlendMode::One);

This is correct in theory, however, for some reason, the rendering is not. I can only guess that this is a bug in SFML itself that is sadly outside our control.

TL;DR: keep using PMA :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants