add wind fade in/out + add wire movement when is windy

This commit is contained in:
2026-04-21 15:16:30 +02:00
parent 9a26a4114b
commit f5a38bd8a0
11 changed files with 130 additions and 40 deletions

View File

@@ -2,6 +2,7 @@ shader_type canvas_item;
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
global uniform float global_wind_speed;
global uniform float global_wind_fade;
uniform vec4 dust_color : source_color = vec4(1.0, 0.456, 0.125, 0.6);
@@ -30,7 +31,7 @@ void fragment() {
float base_time = TIME * dust_speed;
vec2 osc = vec2(sin(TIME * 0.5), cos(TIME * 0.3)) * wind_oscillation;
float wind_active = step(0.0001, abs(global_wind_speed));
float wind_active = global_wind_fade * step(0.0001, abs(global_wind_speed));
vec2 final_wind = ((wind_speed + osc) * dust_speed) * wind_active;
float final_particle_alpha = 0.0;