Shaders

A small program transforming vertices, geometry or fragments on a GPU.

Small programs that run on graphics hardware to transform geometry, calculate pixels and simulate materials.

What is a shader?

A shader is a program executed by graphics hardware to calculate part of a rendering or compute task.

Vertex shaders transform geometry. Fragment or pixel shaders calculate surface color. Other stages may process tessellation, geometry, mesh data or ray intersections.

Why are shaders powerful?

Shaders make a rendering pipeline programmable. The same GPU can draw a realistic material, a scientific field, a post-processing effect or a user interface through different shader code.

What makes them difficult?

A shader runs many times and must respect limits on memory, precision, branching and synchronization.

Visual correctness also depends on coordinate systems, color spaces, sampling, lighting and numerical stability.

Future

Shader systems will combine graphics, compute and machine-learning operations. Better tools will make performance, portability and debugging easier without hiding the physical cost of every instruction.

Ai disclosure: written with the help of AI (ChatGPT). You are encouraged to point out errors and omissions.

Updated: 2026 Sep 18