Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
How to Whiten a Sprite Gradually
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to Whiten a Sprite Gradually (Read 5951 times)
ExCx
Newbie
Posts: 10
How to Whiten a Sprite Gradually
«
on:
September 19, 2013, 02:12:50 pm »
Hi, I need to make a sprite go completely white. I mean like a white silhouette of itself. I can change the shader to do it instantly, but how can I do it gradually?
Logged
marcosramos
2D Toolkit
Newbie
Posts: 21
Re: How to Whiten a Sprite Gradually
«
Reply #1 on:
September 19, 2013, 09:57:17 pm »
This is somehow what i want to know as well.
Logged
profanicus
2D Toolkit
Full Member
Posts: 167
Re: How to Whiten a Sprite Gradually
«
Reply #2 on:
September 19, 2013, 11:37:57 pm »
I think you would need to make a custom shader.
You could copy and change an existing tk2d shader so that the vertex colour is added instead of multiplied. Your sprite colours would then need to be black instead of white by default to be in their 'normal' state. Then when you lerp the tk2d sprite colour to white, the sprite pixels should move towards a solid white instead of being tinted. That's my theory anyway.
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: How to Whiten a Sprite Gradually
«
Reply #3 on:
September 19, 2013, 11:53:20 pm »
You could try this shader:
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,391.msg1708.html#msg1708
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
How to Whiten a Sprite Gradually