Flash with modulate preserve

It does just what the title says ;D

Features:

– choose the flash color

– choose the flash value

You may smoothly animate it or make an instantaneous change.

Shader code
shader_type canvas_item;

uniform vec4 flash_color : source_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform float flash_value : hint_range(0.0, 1.0, 0.1) = 0.0;

void fragment() {
    COLOR = mix(COLOR, vec4(flash_color.rgb, COLOR.a), flash_value);
}
Live Preview
Tags
2d, blink, flash
The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from Merovingen

Related shaders

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments