Home > Net >  How to make a blink shader?
How to make a blink shader?

Time:11-16

I want my gameobject Fade from red to white,and repeatedly.

so i create one shader,like this , but i'm not sure how to turn red then white,and repeatedly.

enter image description here

CodePudding user response:

I believe this is what you're looking to do. It is pretty straight forward you're just blending between two colors and controlling the opacity with the sine of time.

Shader Graph Example

An additional note you can alter the behavior of the blink by replacing the sine node with any of the wave nodes (E.g square wave for a strobe effect).

  • Related