Hello Guest

Author Topic: Black border around sprite.  (Read 3776 times)

cloudcamaleoniv

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 27
    • View Profile
Black border around sprite.
« on: August 21, 2013, 03:15:07 am »
Hello. I'm getting black borders around tk2dSprites. The textures are just fine. But when I put inside a GameObject, it displays these ugly black lines.

I own another 2d plugin, not sure if I can say its name. But when I use the SAME textures, they display just fine.

I tried to change Filter Mode to point. The black borders are gone, but the softness of the sprite are gone too.

You know, I could use this another plugin, but it is VERY limited with animation. Your is much better.

I took some prints to show you.

So, is there a way to get similar results to the first print? (the other plugin)

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Black border around sprite.
« Reply #1 on: August 21, 2013, 09:24:56 am »
Try premultiplied alpha.
Tick premultiplied alpha in the sprite collection, commit and then in the material switch the shader to tk2d/PremulVertexColor. That should "fix" the issue.

Another thing to try (Unity 4.2 only, which is why tk2d doesn't do it automatically), is in the atlas texture, set "Alpha is Transparency". This will likely fix it too.

Mixu

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Black border around sprite.
« Reply #2 on: October 30, 2013, 10:35:23 am »
Hi! I just got this same behaviour and with activating the transparency in the atlas was solved :)

Could 2D Toolkit activate Alpha is Transparency by default? Or with a tick on the atlas generator?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Black border around sprite.
« Reply #3 on: October 30, 2013, 10:45:42 am »
Yeah we've done that in the next version.