Shader Sprite White Flashing but with Opacity

Hi! I wanted to create a shader which will make a sprite turns white for a very short time like in retro games where enemy character flash white when it takes damage.

I tried using Sprite Color in Sprite Renderer component, but white can’t tint a sprite.

My game is a 2D platformer which has some “ghost” unit which are transparent. I want the white flash to also maintain the Sprite Renderer alpha value.

I am very new to shader, even with shader graph…

Any help is appreciated

In shader graph you can build your shader with properties to be affected by script, did you try this? First of all, of course go for some tutorials with shader graph and you can do a lot of try and error with the node based system to test out :slight_smile: Otherwise you could add a 2nd material over the main one and use this one to be plain white and handle its opacity by script.