Slide Down & Up Text Effect

This shader based text effect allows you to create a smooth slide in and slide out animation for text elements.
You can control the progress parameter to move the text upward or downward, and optionally enable fade for a soft opacity transition during the slide.

 

The effect works perfectly for UI elements, dialogues, and title animations, and integrates easily with Godot’s Tween or Animations nodes for smooth time-based transitions.

Tested on Godot v3.5.3

Shader code
shader_type canvas_item;

uniform float progress : hint_range(0.0, 1.0) = 0.0;
uniform float move_amount : hint_range(0.0, 2.0) = 1.0;
uniform float fade_start : hint_range(0.0, 1.0) = 0.6;

void fragment() {
    vec2 uv = UV;
    vec2 new_uv = uv + vec2(0.0, progress * move_amount);
    float inside = step(0.0, new_uv.y) * step(new_uv.y, 1.0);
    vec4 col = texture(TEXTURE, new_uv) * inside;
    float fade = 1.0 - smoothstep(fade_start, 1.0, progress);
    col.a *= fade;
    COLOR = col;
}
Tags
slide down, slide up, text, text effect
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from emre

Gentle Breathing Effect for Face & Body Animation

Related shaders

Wavy & Colorable Text Shader

Slide to unlock shine shader

Spotlight Effect/Transition with Feathering & Position

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments