Term · Compute & AI Hardware
Shader
A small program executed per vertex, pixel or work item on a GPU's programmable units. The term also names the hardware that runs them, as in shader cores or shader engines.
- Also known as
- Shader program, Compute shader
- Type
- Term
- Domain
- Compute & AI Hardware, GPU architecture
Notes
Programmable shaders replacing fixed-function graphics pipelines in the early 2000s is what made GPU compute possible.
Overview
A shader is a small program that a GPU runs many times in parallel, once for each vertex, pixel, primitive or work item, to transform geometry, calculate colours or carry out general computation. The word also names the hardware that runs these programs, as in shader cores, shader units or shader engines. For chip designers, the array of shader cores is a central, performance-critical part of a GPU.
How it works
In a graphics pipeline, fixed stages and programmable stages alternate. A vertex shader runs once per vertex, typically converting 3D positions to screen positions; tessellation and geometry shaders can subdivide or generate geometry; and a fragment or pixel shader computes the colour and other values for each fragment that may become a pixel. Compute shaders sit outside the drawing pipeline and run general-purpose work, such as physics or image processing. Newer stages include mesh and ray-tracing shaders. Shaders are written in languages such as HLSL for Direct3D, GLSL for OpenGL and Metal Shading Language for Apple platforms, and are often compiled to an intermediate form, such as SPIR-V, before the driver translates them for the specific GPU.
In hardware, early GPUs had separate units for vertex and pixel work. Modern GPUs use a unified shader architecture, in which every shader core can run any type of shader and a scheduler shares work across them. ATI's Xenos chip in the Xbox 360 was the first, and Nvidia followed with the GeForce 8 series. Microsoft's Direct3D documentation describes its programmable stages as running on common shader cores.
Because one program runs across many items at once, shader hardware is generally built for total throughput rather than for the speed of any single thread.
Examples
- A pixel shader written in HLSL that applies lighting to each fragment in a Direct3D game.
- A compute shader running a physics simulation on the same GPU cores that render the frame.
- Nvidia's GeForce 8 series moving from separate vertex and pixel units to a unified shader architecture.
- A Vulkan application shipping its shaders as SPIR-V, which the GPU driver compiles for its own instruction set.
- A GPU architect sizing the shader array to balance frame rate against die area and power.
Why it matters
GPU architects, shader pipeline designers, verification engineers, driver and compiler developers and kernel engineers all work around shaders, since the number, width and scheduling of shader cores strongly influence a GPU's graphics and compute performance, its area and its power.
In the chip lifecycle, shader core design dominates GPU architecture and microarchitecture, is verified against graphics and compute test suites before tapeout, and is characterised after first silicon with real games, benchmarks and compute workloads that also drive driver and compiler tuning in production.
It matters most to: GPU Architect, GPU Kernel Engineer, GPU Shader Pipeline Design Engineer, GPU Verification Engineer, Performance Engineer (CPU and GPU Libraries)
Common confusions
- Not the same as a CUDA kernel
- A CUDA kernel is a general-purpose GPU program written for Nvidia's CUDA platform. It runs on the same cores as compute shaders, but it is launched through CUDA rather than a graphics API.
- Not the same as shading in the ordinary sense
- Shading means calculating light and shade on a surface. Shaders began with that job but now do far more, including geometry generation and general computation.
Sources
- High-level shader language (HLSL) (opens in a new tab), Microsoft Learn, 2026-10-22
- Graphics pipeline (Direct3D 11) (opens in a new tab), Microsoft Learn, 2026-10-22
- Shader (Wikipedia) (opens in a new tab), Wikimedia Foundation, 2026-10-22
- Unified shader model (Wikipedia) (opens in a new tab), Wikimedia Foundation, 2026-10-22
Related terms
Part of the Compute & AI Hardware glossary, with every term in the topic and the lifecycles, tools and standards that use them.
Where it appears on the Hub
Used on 9 pages of the Hub. In each group, the pages that mention it most come first.
Suggest an improvement
Suggest an improvement to this entry
A clearer definition, an example, a correction or a source an editor can check. Editors review every suggestion before the entry changes.
Last reviewed . Written by The Semiconductor Hub editorial team. The full glossary