Hello,
I want to set my sprites to one solid color and back via script. My thought was to use a shader. But my knowledge is very limited in this regard. What is the easiest shader to set a sprite to a solid color to the point that only the silhouette can be seen?
Thanks for your time.
Ok I found the answer myself. Take the standard sprite shader and replace the rgb value but not the a:
fixed4 SampleSpriteTexture(float2 uv)
{
fixed4 color = tex2D(_MainTex, uv);
#if UNITY_TEXTURE_ALPHASPLIT_ALLOWED
if (_AlphaSplitEnabled)
color.a = tex2D(_AlphaTex, uv).r;
#endif //UNITY_TEXTURE_ALPHASPLIT_ALLOWED
//Add your color here.
color.rgb = half4(0.0, 0.9, 0.9,1.0).rgb;
return color;
}