Shader

A shader is a small program that runs on the graphics card for every pixel (or vertex) at once, which is how the web draws effects like moving light, liquid and noise at 60 fps.

On the web shaders are written in GLSL and run through WebGL, often with Three.js. A fragment shader decides each pixel's color from inputs like time, pointer position and textures.

Because the work runs in parallel on the GPU, effects that would be impossible with CSS or canvas stay smooth.

See it live

Related terms