Using time to animate
iTime uniform counts up in seconds each frame, and feeding it into sin() produces smooth oscillation — values that wave back and forth endlessly. By offsetting the phase for red, green, and blue channels independently, you get smoothly cycling rainbow colors. This is the core technique behind almost every animated shader effect.