Quick answer: TIME is the engine's running time in seconds and animates any shader that uses it — as long as the screen is being redrawn. In the editor, enable Update Continuously to see it move. In game, low processor mode stops redraws. TIME ignores pause and Engine.time_scale, and wraps after an hour by default; use your own uniform when you need control.

The water shader moves in the game but not in the editor, or the other way around, or it keeps flowing in the pause menu. TIME is simple; the surprises come from when Godot redraws and what TIME deliberately ignores.

Frozen in the editor

The editor only redraws when something changes, to save power. Shaders using TIME appear frozen until you move the view. Enable Editor Settings > Interface > Editor > Update Continuously while working on animated shaders, then turn it off again (it uses more CPU and GPU).

Frozen in the game

Using TIME correctly

TIME is available inside shader functions, not as a uniform default or a constant:

shader_type canvas_item;
uniform float speed = 2.0;

void fragment() {
    vec2 uv = UV;
    uv.x += TIME * speed * 0.1;
    COLOR = texture(TEXTURE, fract(uv));
}

It keeps running when paused

TIME is real elapsed time; it does not stop when get_tree().paused is true and is not affected by Engine.time_scale. If shaders should freeze with the game or slow down with hit-stop, drive them from a uniform:

var shader_time := 0.0
func _process(delta):
    shader_time += delta          # stops when paused, scales with time_scale
    RenderingServer.global_shader_parameter_set("game_time", shader_time)

Declare game_time under Project Settings > Shader Globals, then use global uniform float game_time; in shaders instead of TIME.

It jumps after an hour

TIME wraps back to 0 after Rendering > Limits > Time > Time Rollover Secs (3600 by default) to keep float precision. Effects whose period does not divide evenly into that value jump at the wrap. Raise the setting, or design loops to repeat cleanly, or use your own uniform.

Visual shaders

In a VisualShader, use the Time input node. The same redraw rules apply.

Related fixes