Hi, I want to ask how to overlay a color to a skeleton, but not just simple tint (like with changing r-g-b value of Skeleton). Simplest purpose of this is to show color when the enemies are damaged. I attached a gif example of the effect.
I already implemented this by modifying the Bones shader fragment function to use a tint color, which I can modify the color to black and the tint color to the color I want.
fixed4 col = 2.0f * i.color * _Color * tex2D(_MainTex, i.texcoord);
col.rgb += _TintColor.rgb;
The thing is I want to use the lighting on Unity, so I need to modify it from the SkeletonLit shader and it's more complicated than I thought.
- I tried testing it first on Skeleton shader (then will go test in on Skeleton Lit if successful), changing the fragment function and nothing affect the final animation. Even when I commented out everything and just return the tint color that I set on the material.
- I also tried modifying directly the r-g-b-a value on SkeletonRenderer mesh color, but from what I can tell it's always back to the usual tint (overlay with color + alpha).
Does anyone have experience modifying the Skeleton shader for something like this? Or how to achieve the color overlay effect using other methods but still supporting the lights? I'm using the latest master branch (12 Aug 2015).