You want to preserve the transparency of the sprite. Get the original color like this: vec4 og_color = texture (TEXTURE, UV) and then set the alpha of the new color to the alpha of the old color.
thanks it worked! Can you put a shader in a separate file, attach it to different sprites and choose a separate color for each sprite?
Timofey | 2021-02-22 06:39
Yes. Right click it in the inspector, make unique, and then save it.