EsotericSoftware/spine-runtimes

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

Closed this issue · 1 comments

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!

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