Hello Guest

Author Topic: How could I solve this bleeding issue (have used extend mode with some paddings)  (Read 5184 times)

mamamia

  • Guest
Hi,

I have a little problem with my sprites. Below you can see a picture of one of my sprites (it has been cut from the scene, so, a green background is seen). As you can see when using bilinear sampling a white border appears in the curved side of the piece. This part of the sprite is transparent. I have tried to fix it using extend mode with some differnet pixel padding ammounts without luck. Other modes behave worse.

Could anybody please give any tip to avoid this?.

Thanks in advance.


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
This is caused by an issue with your source asset.
Easy way out - use premultiplied alpha.

1. In sprite collection settings, tick use premultiplied alpha.
2. Commit
3. Find the material used by the sprite collection, and switch the material type to tk2d/PremulVertexColor.

It should look a lot better now.

mamamia

  • Guest
Hi!,

Thanks a lot for the tip unikron. Haven't yet tried your tip because I'm not at home.

Would you mind comment which is the problem with the asset (just to understand why is this happening)?.

Thanks in advance.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile

mamamia

  • Guest
Thanks for the explanation.