flash now supports modulate

This commit is contained in:
Rendo 2025-07-23 18:23:17 +05:00
commit 5cfdf91a71
2 changed files with 27 additions and 28 deletions

View file

@ -6,15 +6,13 @@ 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,HIGHLIGHT_COLOR.rgb,HIGHLIGHT_COLOR.a),text.a);
COLOR = vec4(mix(COLOR.rgb,HIGHLIGHT_COLOR.rgb,HIGHLIGHT_COLOR.a),COLOR.a);
}
else
{
COLOR = vec4(mix(text.rgb,FLASH_COLOR.rgb,FLASH_COLOR.a*blend),text.a);
COLOR = vec4(mix(COLOR.rgb,FLASH_COLOR.rgb,FLASH_COLOR.a*blend),COLOR.a);
}
}