Shader
A shader is a small program that runs on the graphics card and decides how each pixel or vertex is drawn.
Also known as: fragment shader · vertex shader · GLSL
Water moving, metal catching light, fog thickening with distance, text dissolving into particles — all of these are shader work. The code runs on the graphics card, in parallel, for every pixel.
Shaders are where a scene stops looking like everyone else’s. They are also the easiest place to spend performance: a heavy shader can cost more than the whole rest of the scene put together.
Common questions
Do we need a custom shader?
Not always. The standard materials in Three.js cover most needs. A custom shader is for an effect you cannot get any other way.
Do shaders work the same on every device?
Mostly, but not always: mobile GPUs have lower precision and some operations behave differently. Shader work has to be tested on real devices.
How does this term apply to your work? Let us talk.
Get in touch