
shader_type canvas_item;
uniform float speed : hint_range(0.0, 50.0) = 2.0;
uniform float variation : hint_range(0.0, 1.0) = 0.5;
uniform float lean : hint_range(-1.0, 1.0) = 0.0;
uniform float amplitude : hint_range(0.0, 1.0) = 0.05;
uniform float offset_fix : hint_range(0.0, 50.0) = 0.0;
uniform float total_strength : hint_range(0.0, 50.0) = 10.0;
void vertex() {
float sway = lean + sin(MODEL_MATRIX[3].x * variation + TIME * speed) * amplitude;
VERTEX.x += (sway * total_strength - offset_fix * -sign(lean)) * (1.0 - UV.y) * (1.0 - UV.y);
}This feature is currently in beta.
Join the discussion! Log in to share your thoughts.
Log In to Comment