shader_type canvas_item; uniform float strength = 0.5; uniform float speed = 50.0; void vertex() { float offset = sin(TIME * speed) * strength; VERTEX.y += offset; VERTEX.x += offset * step( 100.0 , 50.0 + VERTEX.y ) ; }