Simple wind sway
Made with Godot 4.3
A somewhat very very short and simple wind sway effect
(Im trying to add gif to show how good is it but bruh it uploading sooo looooong TvT)
Shader code
shader_type spatial;
render_mode cull_disabled, depth_draw_always, depth_prepass_alpha;
// what a gentle wind
uniform float wind_strength : hint_range(0.0, 2.0) = 0.2;
uniform float wind_speed : hint_range(0.0, 10.0) = 1.0;
uniform vec3 wind_direction = vec3(1.0, 0.0, 0.0);
uniform vec4 base_color : source_color = vec4(1.0, 1.0, 1.0, 1.0);
void vertex() {
float sway = sin(VERTEX.x * 0.5 + TIME * wind_speed)
+ cos(VERTEX.z * 0.5 + TIME * wind_speed * 1.3);
sway *= 0.5;
VERTEX += wind_direction * sway * wind_strength;
}
void fragment() {
ALBEDO = base_color.rgb;
ALPHA = base_color.a;
}

