What's a Shader?

A shader is a program that runs on a graphics processing unit (GPU) to determine how to draw something on the screen, controlling visual effects like lighting, color, and shadows. By running on the GPU, shaders leverage its power to perform many calculations in parallel, making them efficient for graphics-intensive tasks and freeing up the central processing unit (CPU) for other tasks. They can operate on different types of data, such as calculating a vertex's position on the screen (vertex shader) or the final colour of a pixel (fragment shader).