Created
May 11, 2020 10:09
-
-
Save jimmyjonezz/9a27b875734eb4e5e68c46bea5d9dbc5 to your computer and use it in GitHub Desktop.
image -> gradient color.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type canvas_item; | |
uniform vec4 glow_color : hint_color; | |
uniform vec4 back_color : hint_color; | |
void fragment() { | |
vec4 text = texture(TEXTURE, UV); | |
float flow = sin(-text.g + TIME) * text.a; | |
flow = smoothstep(0.5, 1., flow); | |
COLOR = mix(vec4(back_color.rgb, 0), back_color, text.a); | |
COLOR = mix(COLOR, glow_color, flow); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment