2D Toolkit Forum
2D Toolkit => Support => Topic started by: kreso22 on November 30, 2014, 04:51:35 am
-
Hi,
First to say I spent 2 days trying to create my own solution with no success. What I gained from these 2 days is some knowledge of shaders, and a huge appreciation for what 2Dtk can do and does (as I was browsing source code for reference).
For my 2D, unlit game I would like to change shade of color for the sprite. I can change sprite's color with 2Dtk editor utility and still stay at 1 draw call, which is great. But the sprite will look too dark.
Is there any way to achieve effect like Self-iluminated/Diffuse shader? The effect that I get by just applying Main Color parameter is marvelous. Unfortunately shader doesn't work with transparency. And ideally keep at 1 draw call (edit material tint via script).
I am thinking only change current shader (tk2d/Blend Vertex Color) and somehow multiply values or something, but I don't understand shader rules.
Any help is appreciated.
Thank you in advance,
Kreso
-
Change blend mode to additive.
Eg. Blend SrcAlpha OneMinusSrcAlpha to Blend SrcAlpha One
That will probably do something similar.
-
Thanks a lot for the suggestion. I tried combining all the blend modes and didn't succeed in achieving the effect.
Then I took a step back .. basically I have a greyscale sprite that I want to tint with color. So I tried making it brighter in grayscale - and it worked.
I know this sounds obvious and I should have done that right away... but I did it now.
Thanks a for your help!
Kreso