add wind fade in/out + add wire movement when is windy
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user