Quick answer: Godot 4 shader TIME uniform jumping back to zero after the tree pauses and unpauses? TIME is wall clock; pause stops accumulation, not the reset - use an explicit uniform driven by your code.
Pulsing glow shader looks continuous in editor. Pause and resume in game; the glow restarts mid-cycle.
Drive a custom uniform
material.set_shader_parameter("u_time", custom_time)Increment custom_time in _process(delta) using scaled or unscaled time per your needs. TIME is engine-managed; u_time is yours.
Or use the canvas item TIME
For 2D, TIME in canvas item shaders survives pause better than 3D's. Try the canvas variant first.
Avoid frame-counter time
Counting frames as time becomes wrong at variable frame rates. Always accumulate against real delta.
“Shader TIME is engine state. Your effects shouldn't depend on someone else's state machine.”
For UI effects, drive everything via your own time uniform. Auto-pausing fits in two lines and survives every engine quirk.