pixijs / spine

Pixi.js plugin that enables Spine support.
Other
564 stars 217 forks source link

.webp extension artifacts #472

Open Technostalgic opened 1 year ago

Technostalgic commented 1 year ago

image

These blocky artifacts appear around partially transparent parts of the image when I use .webp as an export format with spine. It works fine with .png, the artifacts do not appear. I know the issue is not with the image itself, as I can render the same .webp image as a PIXI.Sprite and it does not show any artifacts like above.

Spine initialization code is simple, I am not changing any render settings or anything. Just the scale and position:

let bgWaveSpine = new SPINE.Spine(EnvironmentRenderer.spData_backroundAnim);
bgWaveSpine.position.copyFrom(bgAnchor.toGlobal({x: 0.474, y: 0.15}));
bgWaveSpine.scale.set(bgSprite.scale.x / (854 / bgSprite.texture.width));
bgWaveSpine.state.setAnimation(0, "background_animation", true);
this.renderContainer.addChild(bgWaveSpine);

Any idea what could be causing this?

wpitallo commented 9 months ago

Did you manage to find a solution to this? Having the same issue?

Technostalgic commented 9 months ago

Did you manage to find a solution to this? Having the same issue?

unfortunately I never found a fix for it. I was forced to use PNG export format

Corginyan commented 7 months ago

The problem seems to be resolved by disabling the "premultiply alpha" option when packaging the atlas from spine.