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);
}