2D Toolkit Forum

2D Toolkit => Support => Topic started by: cloudcamaleoniv on June 07, 2013, 10:18:02 pm

Title: Circular sprite - Outline appearing
Post by: cloudcamaleoniv on June 07, 2013, 10:18:02 pm
Hello, I've got this problem before on a rectangular sprite, where all of the rectangle was filled by the image. I've had to duplicate that sprite to give a parallax sensation, but the sprite had that ugly thin black line.

All you've said to me was "Change the pad method to extend", and it worked great! Thanks for that.

Now I've got a very similar problem. I have to do some kind of a trail. The way I pictured it is creating a ball and duplicating it one after another, following the character.

Well... The outline is keeping me from getting a nice result. And I just can't get it off. Even with the "extend" thing, which I think it might work for full filled rectangle sprites. But what about a 'not-rectangle' one? As a circle? How can I do that?

Keeping in mind that... the "outline" are the alpha bits of the image, only visible when you put another very close to it (or if you have a very great eye). Not an actual outline.


Thanks man.
Title: Re: Circular sprite - Outline appearing
Post by: unikronsoftware on June 07, 2013, 11:00:58 pm
This is probably an issue with the source texture -

Premultiplied alpha will likely fix it.
Open the sprite collection editor, and in settings - tick premultiplied alpha and Commit.
After that, locate the atlas material, switch shader to tk2d/PremulVertexAlpha.

A more detailed explaination
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,189.0.html