Hello Guest

Author Topic: Best Shader To use for a sprite  (Read 4501 times)

blameMike

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Best Shader To use for a sprite
« on: September 24, 2013, 05:55:22 pm »
I get a white outline on my sprite when it's against a dark background. I'm currently using the tk2d/Blend2TextVertexColor shader. Is there a better shader to use for this, or perhaps this is another issue?

http://d.pr/i/Bb3w

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Best Shader To use for a sprite
« Reply #1 on: September 25, 2013, 10:39:46 am »
You can try using the Premul vertex color variant (don't forget to turn on premultiplied alpha in the sprite collection editor and commit). That should get rid of the problem.

Or - if you don't need filtering, use point filtering for the texture - it should get rid of this as well.

blameMike

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Best Shader To use for a sprite
« Reply #2 on: September 26, 2013, 01:28:40 am »
Awesome! Thank you.