From Triangles to Transformers: How Graphics Programming Built the Foundation of Modern AI
Back in the early days of mobile development, OpenGL ES talks at developer meetups were all about getting a spinning textured cube to render on a phone. That world feels distant now — but the ideas underneath it never went away. They just moved into a much bigger arena: training the large language models and AI systems everyone uses today.
This is a refreshed look at the classic graphics pipeline, written for a 2026 audience. We’ll walk through how 3D rendering actually works, and then connect the dots to explain why the GPU — a chip originally built to draw triangles faster — became the single most important piece of hardware in the AI revolution.
The Graphics Pipeline, Still the Same Bones
Whether you’re rendering a game character on a phone or a movie-quality scene in a real-time engine, the core pipeline hasn’t fundamentally changed:
Geometry — The 3D object is described as a mesh of triangles.
Transform — Model, view, and projection transforms are combined into MVP matrices that move every vertex into screen space.
Rasterize and shade — Triangles become pixel fragments, and each fragment gets a color, from flat shading up to fully lit and textured.
Composite — Overlapping fragments are blended and depth-tested into the final pixel.
Shaders aren’t really a separate “stage” — they’re the customizable code that runs inside stages 2–4, so I called that out separately rather than making it a fifth bucket.
I’ll update the article text to use this 4-category framing instead of the flat 8-item list — want me to go ahead and revise the file too?
If you strip away the buzzwords, what’s actually happening is this: millions of small, identical, independent math operations — mostly matrix and vector multiplication — need to happen in parallel, every single frame, 60+ times a second.
That single requirement is the reason GPUs exist, and it’s also — almost accidentally — the reason GPUs ended up training every major AI model in use today.
Why GPUs Were Built the Way They Were
A CPU is optimized for doing a few complex, sequential things very well — branching logic, single-threaded performance, handling lots of different instruction types.
A GPU is optimized for the opposite: doing the same simple operation (a matrix multiply, a vector transform) on thousands of data points at once. Rendering a frame means transforming millions of vertices and shading millions of pixels, and every one of those operations is essentially the same calculation repeated with different inputs. So GPU hardware evolved into an array of thousands of small, simple cores running in lockstep — exactly the architecture you want for “embarrassingly parallel” math.
This turned out to be a historical accident with enormous consequences.
The Pivot: Graphics Math Is Deep Learning Math
Around the early-to-mid 2010s, researchers training neural networks ran into a wall. Training a network means doing huge numbers of matrix multiplications — multiplying inputs by weight matrices, layer after layer, then propagating gradients back through the network. CPUs were painfully slow at this because matrix multiplication at scale is, again, the same parallel operation repeated millions of times.
Researchers realized that the hardware sitting inside every gaming PC was already built to do exactly this kind of math, because:
A vertex transform (multiplying a vertex position by a 4×4 matrix) and a neural network layer (multiplying an input vector by a weight matrix) are the same underlying operation: matrix-vector multiplication.
Shading millions of pixels in parallel and computing activations for millions of neurons in parallel are structurally the same workload: apply a function across a huge, independent array of data.
The “rasterize, shade, blend” loop and the “forward pass, compute loss, backward pass” loop are both pipelines of staged, parallelizable tensor operations.
In short: the GPU’s core job — moving and transforming huge arrays of numbers in parallel — turned out to be exactly what neural networks needed. Frameworks emerged that let researchers express neural network operations as the same kind of parallel matrix math the GPU was already optimized for, and from there the deep learning boom took off. Every major leap since — image recognition, generative image models, and ultimately large language models — has run on hardware whose lineage traces directly back to graphics chips designed to draw triangles.
Where the Pipeline Concepts Show Up in AI Today
It’s worth being concrete about the overlap, because it’s not just a vague analogy:
Matrices everywhere. MVP matrices transform vertices into screen space. Weight matrices transform input vectors into the next layer’s representation. Both are just linear algebra at scale.
Parallel, independent work. Shading a million pixels independently looks structurally identical to computing a million neuron activations independently — both are “map the same function over a huge array,” which is the exact workload GPUs were designed to chew through.
Pipelines of stages. The render pipeline (transform → rasterize → shade → blend) and a neural network’s forward pass (matrix multiply → activation → next layer) are both staged sequences of transformations applied to large tensors.
Specialized hardware blocks. Modern GPUs now ship with dedicated matrix-multiplication units (often called tensor cores) specifically because matrix multiplication is the shared bottleneck of both rendering and AI training. What started as a feature for faster graphics workloads became, in later hardware generations, a feature primarily justified by AI training and inference demand.
Shaders as programmable kernels. Shaders were the first widely-used way to write small, custom programs that run across thousands of GPU cores at once. That same idea — small programs executed massively in parallel — is the conceptual ancestor of the compute kernels that now run neural network training jobs.
Why This Still Matters If You’re Learning Graphics in 2026
If you’re picking up graphics programming today, you’re not learning a niche or fading skill — you’re learning the mental model behind the most economically important hardware on the planet. Understanding:
how transformations and matrices move data through a pipeline,
how rasterization and parallel execution work,
and how shaders let you write code that runs across thousands of cores simultaneously,
gives you real intuition for why GPUs dominate AI compute, why “tensor operations” are the unit of work in machine learning frameworks, and why companies are now building entire data centers full of chips that are, at their core, descendants of graphics processors.
It also explains a lot of present-day industry dynamics: why graphics chip makers became AI infrastructure companies, why GPU availability is a bottleneck for AI labs, and why so much of modern AI engineering — efficient batching, parallel computation, hardware-aware optimization — borrows directly from decades of real-time graphics engineering.
A Modern Starting Point
Rather than the scattered mix of old forum pages and lecture videos that used to make up a “learn graphics” reading list, today’s best entry points are:
A current graphics API’s official getting-started guide (Vulkan, Metal, WebGPU, or your engine of choice’s documentation) for hands-on pipeline fundamentals.
A modern deep learning framework’s official tutorials, to see the matrix/tensor operations side by side with what you just learned about transforms and shading.
Any well-regarded current computer graphics textbook, ideally paired with a course that also touches on GPU architecture — since the architectural story is now half the point.
The triangles haven’t gone anywhere. They just turned out to be training data for everything that came after them.

