How to make dynamic (change over time) shaders?

I’ve been trying to make some shaders I’ve been using change over time. For example, having the player’s screen start pixelating if they move near something, and then go back to normal if they move away. However I haven’t been able to figure out how, since it doesn’t seem like changing a shader’s values/settings is possible in runtime, I can only do it before running the game.

BTW I am not talking about using different shaders for different viewports or anything like that. I’ve already figured out how to make shaders work, it’s just that now I want them to change their effects over time.

I’ve tried searching up online for help but I haven’t found anything relating to what I’ve been asking, even on the official docs.

Shader materials have a set_shader_parameter function

var material: ShaderMaterial = $MeshInstance3D.mesh.material
var distance: float = player.global_position.distance_to(global_position)
material.set_shader_parameter("player_distance", distance)

You can also animate shader parameters directly using animation players and tweens.