Is there a way to directly animate a shader uniform via AnimationPlayer or in some other way? If not, this is something to consider for the future versions as it'd be very useful. I know it can be done indirectly by animating a node property and manually sending it's value to the shader.

10 days later

You can create keyframes for shader params. Just have the animation tab selected and click the key button next to the uniform you want to create a keyframe for.

Oh, so it's possible. Godot keeps surprising me in pleasant ways :) I was trying to animate via tweens but didn't know there's a catch with path syntax. Now that I looked how AnimationPlayer specifies the path, all is clear. I tried:

:material_override:shader_param:uniform_name

Which didn't work. Proper syntax then is:

:material_override:shader_param/uniform_name

And it works with tweens too. Cool!

@cybereality it's not looped. Only one-shot eased transition that gets triggered sporadically and has different duration each time it happens. I do use TIME for looping stuff.

Thanks for the hints guys!

a year later