newlon/assets/shaders/generic_flash.gdshader
2025-07-23 16:07:55 +05:00

19 lines
No EOL
416 B
Text

shader_type canvas_item;
uniform vec4 FLASH_COLOR : source_color = vec4(1,0.709803921,0.43921568,0.5);
uniform bool selected = false;
uniform float blend : hint_range(0.0, 1.0, 0.01);
void fragment() {
vec4 text = texture(TEXTURE,UV);
if (selected)
{
COLOR = vec4(mix(text.rgb,FLASH_COLOR.rgb,FLASH_COLOR.a),text.a);
}
else
{
COLOR = vec4(mix(text.rgb,FLASH_COLOR.rgb,FLASH_COLOR.a*blend),text.a);
}
}