More work on combat

This commit is contained in:
2025-10-09 14:52:47 -04:00
parent 7563e99059
commit 9a216d3285
44 changed files with 547 additions and 103 deletions

View File

@@ -0,0 +1,26 @@
shader_type canvas_item;
render_mode blend_mix;
uniform bool flash;
uniform float flash_strength = 0.4;
uniform vec4 highlight : source_color = vec4(1,1,1,0);
void vertex() {
}
void fragment() {
vec4 col = texture(TEXTURE, UV);
vec4 h = highlight;
if(flash){
h.a = flash_strength * (sin(TIME * 10.0) + 1.0)/2.0;
}
//COLOR.r *= col.r;
//COLOR.g *= col.g;
//COLOR.b *= col.b;
COLOR.rgb = mix(COLOR.rgb, h.rgb, h.a);
COLOR.a = col.a * COLOR.a;
}