About the course
Programs for the graphics card in GLSL (WebGL2) right in the browser: code on the left, picture on the right. Color and coordinates, the GLSL language, shapes and distance functions, rotation and animation, noise, marble and Voronoi cells. For people who can already program.
Course program: 43 lessons
C syntax for Python programmers
- Types, declarations, semicolons
- Conditions, loops, functions
- Checkpoint: C syntax
The pipeline and running shaders
- A shader is the body of a loop over pixels
- First shader: color
- Pixel coordinates
- Lines y = c and x = c
- The line y = kx + b
- uniform, in/out and compile errors
- Checkpoint: the pipeline and first shaders
The GLSL language
- Vectors and swizzling
- Vector operations
- Built-in functions
- mix — blending colors
- Your own functions
- Types and precision
- Loops in a shader
- GLSL: mixed practice
- Checkpoint: the GLSL language
Shapes and color
- Circle
- Soft edge and mask
- Rectangle
- Distance functions
- Shadows of shapes
- Polar coordinates
- Color: HSV and palettes
- Plotting a function
- Build a picture
- Checkpoint: shapes and color
Transformations and time
- Shifting and scaling coordinates
- Rotation
- Animation: u_time
- Repetition: fract
- Patterns in motion
- Checkpoint: transformations and time
Procedural textures and noise
- Pseudo-randomness
- Value noise
- fBm — a sum of octaves
- Marble, wood, clouds
- Voronoi cells
- Domain warping with noise
- A complete procedural texture
- Checkpoint: noise and procedural textures