Plants flash and shovel alt

This commit is contained in:
Rendo 2025-07-23 16:07:55 +05:00
commit e4c25a1ca5
23 changed files with 451 additions and 195 deletions

View file

@ -0,0 +1,24 @@
shader_type canvas_item;
render_mode unshaded;
uniform vec4 FLASH_COLOR : source_color = vec4(1,0.709803921,0.43921568,0.5);
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
uniform float blend : hint_range(0,1,0.01);
uniform bool selected = false;
void fragment() {
vec4 text = textureLod(screen_texture, SCREEN_UV, 0.0);
if (text.a > 0.0001) {
text.rgb /= text.a;
}
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);
}
}