How a Graphics Card Works
From Pixels to Ray Tracing
What is actually happening inside that large, fan-covered circuit board? How does a graphics card (GPU) turn a list of 3D coordinates into the stunning scenes you see on screen? And why are GPUs now used for AI and cryptocurrency mining?
1. GPU vs. Graphics Card – A Common Confusion
- GPU (Graphics Processing Unit): The actual chip that does the computation. It is soldered onto a circuit board.
- Graphics Card: The entire assembly – the GPU chip, VRAM (video memory), voltage regulators, cooling system, and video outputs (HDMI, DisplayPort).
Analogy: The GPU is like the engine of a car; the graphics card is the entire car including the engine, transmission, wheels, and body.
2. The Massive Parallelism of GPUs
|
CPU |
GPU |
|
|
Cores |
4–16 powerful cores |
Thousands of simple cores (10,000+ on high-end) |
|
Memory |
Small cache (MB) |
Large shared memory (GB of VRAM) |
|
Best for |
Serial tasks, branching logic, low latency |
Parallel math, graphics, matrix operations |
To draw a 3D scene, the GPU must compute the color of millions of pixels independently – a "embarrassingly parallel" problem, perfect for a GPU.
3. The Graphics Pipeline – From 3D Models to 2D Pixels
Step 1: Vertex Shading (Geometry)
The game world is made of triangles. Each triangle has three vertices. The vertex shader transforms each vertex from 3D world coordinates to 2D screen coordinates, also applying lighting per vertex.
Step 2: Rasterization
The GPU determines which pixels on your screen are covered by each triangle. For a 4K screen (3840×2160), the GPU may process millions of triangles, each covering dozens or hundreds of pixels.
Step 3: Pixel Shading (Fragment Shading)
For every pixel covered by a triangle, the pixel shader computes the final color, considering textures, lighting, shadows, reflections, and transparency. This is the most computationally intensive stage.
Step 4: Output Merger
The GPU combines all pixels from all triangles, handling transparency, depth testing, and anti-aliasing. The final pixel colors are written to the frame buffer, which is sent to your monitor.
All four steps happen for every frame, 60 times per second.
4. VRAM – The GPU's Own Memory
VRAM (Video RAM) is high-bandwidth memory attached directly to the GPU. It stores textures, vertex buffers, frame buffers, and shader programs. A modern GPU like an RTX 4090 has memory bandwidth of over 1,000 GB/s – about 10× faster than system RAM.
When VRAM runs out, the GPU must borrow system RAM over the PCIe bus (16–32 GB/s). Frame rates drop dramatically, and stuttering occurs.
5. Ray Tracing – The New Paradigm
Traditional rasterization is fast but inaccurate – light bounces in real life, but rasterization does one bounce per light source. Ray tracing simulates the physical behavior of light by tracing rays from the camera into the scene, bouncing off surfaces, and accumulating color.
- For each pixel, the GPU shoots one or more rays into the scene.
- Each ray bounces off objects (reflections), passes through glass (refraction), and travels toward light sources.
- The GPU computes the color contribution of each ray, then averages them.
Modern GPUs have dedicated RT cores that speed up ray intersection tests. Most games use rasterization for the main scene, then ray tracing for specific effects: reflections, shadows, and global illumination.
6. Real-World Performance – What the Numbers Mean
|
Term |
What It Measures |
|
Core clock (MHz) |
Speed of the GPU cores – higher is faster, but thermal throttling limits sustained speed. |
|
Memory bandwidth (GB/s) |
How fast VRAM can feed data to the cores. |
|
TFLOPs |
Theoretical maximum math throughput. Useful for comparing within the same generation but not across architectures. |
Realistic advice: Ignore TFLOPs for gaming. Look at real-game benchmarks (FPS at your target resolution).
Summary
|
Term |
Definition |
|
GPU |
The chip that does graphics calculations. |
|
Graphics Card |
The entire assembly including GPU, VRAM, and cooling. |
|
Vertex Shader |
Transforms 3D vertices to 2D screen coordinates. |
|
Rasterization |
Determines which pixels a triangle covers. |
|
Pixel Shader |
Computes final color for each pixel. |
|
VRAM |
High-bandwidth memory on the graphics card. |
|
Ray tracing |
Simulates physical light bounces for realistic reflections and shadows. |
Review Questions
- Why do GPUs have thousands of small cores instead of a few large ones like CPUs?
- In the graphics pipeline, which step is the most computationally intensive?
- Why does running out of VRAM cause severe stuttering even if the GPU cores are not fully utilized?