GLSL for beginners
Ten lessons from zero. A color is three numbers, every pixel knows its coordinates, and time makes it move. The last lesson is a tunnel of light.
- Hello, lightOne fragment. Millions of colors. Your first piece.
- The three numbersRed, green, blue. That is how you make any color.
- MixingThree operations. Total control.
- CoordinatesEvery frag knows where it is.
- The gradientA position controls a color. There you go, you are an artist.
- The centerThe origin point of every shader.
- The clockT is time. Your first live variable.
- The wavesin() of position. Patterns from one function.
- The glowDistance to center. exp() does the rest.
- The tunnelEverything together. 1/distance. Everything you learned in one output.