2D Toolkit Forum

2D Toolkit => Support => Topic started by: Dajuice on February 20, 2013, 03:44:48 pm

Title: Premultiplied white shader?
Post by: Dajuice 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!
Title: Re: Premultiplied white shader?
Post by: unikronsoftware 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...
Title: Re: Premultiplied white shader?
Post by: Dajuice 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.
Title: Re: Premultiplied white shader?
Post by: amaranth 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?
Title: Re: Premultiplied white shader?
Post by: unikronsoftware on March 12, 2013, 09:19:17 am
Yup. Grab it from here:
http://2dtoolkit.com/forum/index.php/topic,118.0.msg311.html#msg311