Hello Guest

Author Topic: Premultiplied white shader?  (Read 4842 times)

Dajuice

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 45
    • View Profile
Premultiplied white shader?
« on: February 20, 2013, 03:44:48 pm »
Hi!
Well, I already asked for a shader that flashes white, this saved my life, thank you! But now I got to make something with a white outline flash... I tried the same approach on premultiplied vertex color shader, it didn't quite give the expected result, tried some variants, did nothing good... How do you do it?

Once again, thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Premultiplied white shader?
« Reply #1 on: February 21, 2013, 11:58:56 pm »
It won't be that simple with a white outline. You'll need to apply the tint to the body but not the outline. That means being able to distinguish between body and outline, which isn't immediately possible with the texture scheme used for the outline. You can do things to work around it, for example giving the alpha channel different values to distinguish between border and glyph, but it won't be super efficient on mobile platforms like the other shader...

Dajuice

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Premultiplied white shader?
« Reply #2 on: February 22, 2013, 01:39:28 pm »
Thanks for the reply, I guess if I have to split the outline from the core, I'll just make a white version of the images and play with the alpha.

amaranth

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
  • Amaranthians rule!!!
    • View Profile
    • Amaranth Games
Re: Premultiplied white shader?
« Reply #3 on: March 12, 2013, 01:08:48 am »
Hi, I am looking for a 2d shader that flashes a sprite white. Is there a link to it somewhere?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Premultiplied white shader?
« Reply #4 on: March 12, 2013, 09:19:17 am »
« Last Edit: September 01, 2015, 10:51:33 am by unikronsoftware »