2D Toolkit Forum
2D Toolkit => Support => Topic started by: mamamia on May 19, 2013, 10:34:34 pm
-
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.
-
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.
-
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.
-
I wrote an explanation a long time ago.
Link: http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,189.msg693.html#msg693
-
Thanks for the explanation.