Every frame your GPU draws starts as a pile of triangles. Some sit fully in view, some sit fully off-screen, and plenty straddle the edge. Triangle clipping is the step that sorts this out — and it runs quietly on every frame you’ve ever seen rendered.
Quick Answer
Triangle clipping trims triangles against the boundary of what the camera can see, so only visible geometry moves forward to the pixel stage. It runs after vertex processing and before rasterization — the step that turns triangles into pixels.
Three things are worth knowing up front:
- Clipping happens before rasterization. The pixel stage never sees geometry it doesn’t need to draw.
- Clipping can create new vertices. When a triangle crosses a boundary, the GPU calculates new points where the edges meet the edge of the view — it doesn’t just delete the triangle.
- Clipping is not the same as culling. Culling throws out whole triangles or objects. Clipping reshapes the ones that only partly cross the boundary.
Bottom line: Triangle clipping trims and reshapes geometry at the view boundary before any pixels are generated. It’s faster, cleaner, and more precise than most people realize.
What Is Triangle Clipping?
Triangle clipping is how the GPU decides which parts of a triangle are worth drawing — and which parts to cut away.
Triangles are the GPU’s building block
Everything you see on screen — a character’s face, a wall, a landscape — is built from triangles. They’re the smallest shape the GPU can draw, and every model is broken down into thousands or millions of them. When we talk about clipping, we’re talking about what happens to each of those shapes at the edge of what the camera can see.
The view frustum defines what’s visible
Your camera can only see part of the 3D world at any moment. That visible region is called the view frustum — think of it as a pyramid-shaped box with the tip at the camera, widening into the scene, and capped by a near plane (close to the camera) and a far plane (at the maximum draw distance). Anything inside that shape can appear on screen. Anything outside it cannot.
Clipping trims what crosses the boundary
Many triangles sit partly inside the frustum and partly outside. One corner might poke past the left edge of the screen; another might dip below the bottom. Clipping steps in and removes the part that falls outside, keeping only what the camera can actually see.
Picture a triangle sliding off the edge of your monitor. Instead of drawing the full shape and hoping the off-screen portion gets ignored later, the GPU reshapes it right here — so only the visible piece continues down the pipeline.
Bottom line: Clipping takes triangles that cross the edge of the visible frustum and trims them down to just the part that fits inside.
Why Does Clipping Happen Before Rasterization?
Clipping runs before rasterization to protect the pixel stage from doing pointless work.
Rasterization — the step that converts triangles into pixels — is one of the heaviest stages in the entire pipeline. Sending off-screen geometry into it would mean coloring pixels that no one ever sees. Clipping acts as a filter that catches that wasted effort before it starts.
There’s a correctness reason too. Geometry sitting behind the camera, or stretching past the near plane, can cause artifacts if it slips through unclipped. Math values can wrap around or flip in strange ways during later calculations. Clipping cuts to clean boundaries before any of that happens.
Bottom line: Clipping runs before rasterization so the pixel stage only ever works on valid, on-screen triangles — which saves performance and prevents visual glitches.
Where Does Clipping Sit in the GPU Pipeline?
Clipping has a fixed position in the pipeline: after vertex processing, before the perspective divide.
Here’s the full sequence a triangle passes through:
- Vertex processing — Each vertex is transformed from 3D world space into clip space using the model, view, and projection matrices.
- Clipping — Triangles are tested against the frustum boundaries and trimmed or discarded where needed.
- Perspective divide — Coordinates are normalized by dividing by w, producing normalized device coordinates (NDC), a tidy –1 to 1 cube.
- Viewport transform — Those normalized coordinates map onto actual pixel dimensions on screen.
- Rasterization — Triangles become pixel fragments, ready for shading.
Clipping happens in clip space — right after vertices are transformed, but before the perspective divide. That placement is deliberate: at this stage the GPU knows exactly where each triangle sits relative to the frustum, but hasn’t yet committed any effort to turning it into pixels.
Bottom line: Clipping is the gatekeeper between geometry and pixels, sitting in clip space just after vertex processing and just before the perspective divide.
How Triangle Clipping Works Step by Step
Here’s what actually happens to a triangle as it moves through the clipping stage:
- Test each vertex against the frustum planes. The frustum has six boundary planes: left, right, top, bottom, near, and far. The GPU checks each vertex to determine which side of each plane it falls on.
- Pass triangles that are fully inside. If all three vertices sit within the frustum, the triangle needs no trimming. It passes through untouched.
- Discard triangles that are fully outside. If the entire triangle sits beyond a frustum plane, none of it can be seen. It’s thrown out.
- Cut triangles that cross a boundary. This is the step most people don’t expect. When a triangle straddles a plane, the GPU calculates exactly where each edge crosses that boundary and generates new vertices at those intersection points. The outside portion is dropped; the inside portion is kept — reshaped.
- Re-triangulate when needed. Slicing a triangle often produces a shape with more than three corners — a quad, or even a pentagon. Since the GPU only draws triangles, it breaks that new polygon back into triangles before moving on.
That fourth step is the critical one. Clipping doesn’t just keep or delete triangles as they arrived. It can build new vertices that never existed in your original model, placed precisely where an edge meets a frustum boundary.
Bottom line: Clipping reshapes geometry rather than simply deleting it — creating new vertices at boundary crossings, then re-triangulating the result before anything becomes a pixel.
Clip Space vs NDC vs Screen Space
These three coordinate spaces are often blurred together. They’re distinct, and they happen in a specific order.
|
Coordinate space |
What it is |
When it happens |
|---|---|---|
|
Clip space |
Where clipping runs. Uses homogeneous coordinates that include a w component. The frustum maps to a regular shape here, making boundary tests clean and consistent. |
Right after vertex transformation |
|
NDC (normalized device coordinates) |
A tidy –1 to 1 cube on all axes, produced by dividing clip-space coordinates by w (the perspective divide). |
After the perspective divide |
|
Screen space |
Actual pixel coordinates on your display, mapped from NDC by the viewport transform. |
After the viewport transform |
The order matters, and the reason clipping happens in clip space — not NDC — is important. Dividing by w can produce unpredictable results for geometry that sits behind the camera. Clipping against clean frustum boundaries first avoids that problem entirely. Only after the geometry is trimmed does the perspective divide happen.
Bottom line: Clip space comes first and is where clipping happens. NDC comes second, after the perspective divide. Screen space comes last, as real pixel coordinates.
Clipping vs Culling: What’s the Difference?
The short version: clipping reshapes geometry; culling discards it entirely.
Both reduce the GPU’s workload, but they operate at different levels of precision.
Clipping handles triangles that are partly inside the view. It trims them at the frustum boundary, creates new vertices where needed, and passes only the visible portion forward.
Culling handles whole triangles or objects that don’t need drawing at all — and throws them out in one pass. Common types include:
- Back-face culling — Skips triangles facing away from the camera.
- Frustum culling — Skips entire objects that fall completely outside the view frustum.
- Occlusion culling — Skips objects hidden behind other objects.
The difference comes down to granularity. Culling makes a fast, binary decision: keep or discard the whole thing. Clipping does the finer work of slicing the parts that only partly fit — and building new geometry in the process.
Bottom line: Culling is all-or-nothing. Clipping is a precision cut. You need both, and they’re not interchangeable.
Common Triangle Clipping Algorithms
A few classic algorithms handle the geometry math behind clipping. You rarely need to implement any of them yourself today, but knowing the names helps when reading GPU or graphics literature.
- Sutherland-Hodgman — The most widely cited approach. Clips a polygon against one frustum plane at a time, walking through all six planes in sequence. Simple, reliable, and commonly referenced in textbooks.
- Cohen-Sutherland — Originally designed for 2D line clipping. Uses region codes to quickly determine whether a segment is fully inside, fully outside, or crossing a boundary. Sometimes adapted for triangle edges.
- Homogeneous clipping — Works directly in clip space using the w coordinate. Avoids the math problems that appear after the perspective divide, and is the approach closest to what modern GPU hardware actually does.
The practical reality: modern GPUs handle clipping in fixed-function hardware. Developers building games or real-time apps almost never write general triangle clipping code. Understanding the concept matters — knowing the exact algorithm rarely does.
Bottom line: The algorithms are useful context, not required knowledge. The concept matters far more, and the hardware handles the math automatically.
Common Misconceptions About Triangle Clipping
A few mix-ups come up constantly. Clearing them up is often what makes everything else click.
- “Clipping and culling are the same thing.” They’re not. Clipping reshapes partial geometry and can create new vertices. Culling discards whole pieces without touching their shape.
- “Clipping just deletes triangles that are outside the view.” Sometimes yes — but when a triangle straddles the boundary, clipping trims it and adds new vertices. It’s a geometry operation, not just a visibility check.
- “Clip space and NDC are identical.” They’re not. Clip space comes before the perspective divide; NDC comes after. Clipping runs in clip space, not NDC.
- “Clipping only mattered in older pipelines.” It’s still a fundamental step in every modern GPU pipeline, handled automatically and efficiently in hardware.
- “Developers manually implement triangle clipping in modern engines.” Almost never. The fixed-function GPU pipeline handles it. Custom clipping appears only in specialized shader work.
Bottom line: Most confusion around clipping comes from blending it with culling, or collapsing clip space and NDC into one thing. Keep those distinctions clear and the topic becomes straightforward.
FAQ
What is triangle clipping in GPU rendering?
Triangle clipping is the pipeline step that trims triangles against the view frustum — the region the camera can see — so only visible geometry continues to the pixel stage. It runs after vertex processing and before rasterization, and it can create new vertices where triangle edges cross a frustum boundary.
Does clipping happen before or after rasterization?
Before. Clipping runs after vertex processing and before rasterization. This order ensures the pixel stage only ever receives valid, on-screen geometry — which saves computation and prevents rendering artifacts.
What is the difference between clipping and culling?
Clipping reshapes triangles that partially cross the view boundary and can generate new vertices in the process. Culling discards whole triangles or objects that don’t need drawing at all. Clipping is a precision operation; culling is an all-or-nothing discard.
Can triangle clipping create new vertices?
Yes — and this is the most commonly overlooked part. When a triangle straddles a frustum plane, the GPU calculates exactly where each edge meets that boundary and places new vertices there. The resulting polygon is then re-triangulated before moving forward.
Is triangle clipping still relevant on modern GPUs?
Completely. It’s a core step in every modern GPU rendering pipeline. Today’s hardware handles it automatically in the fixed-function pipeline, so it runs fast without any developer intervention.
What is the difference between clip space and NDC?
Clip space is where clipping happens — it uses homogeneous coordinates including a w component, and it sits before the perspective divide. NDC (normalized device coordinates) is the –1 to 1 cube produced after dividing by w. Clip space comes first; NDC comes second.
Final Word: From Rendering Theory to Real Hardware
Triangle clipping does one thing, and it does it on every frame: it trims triangles at the frustum boundary before the pixel stage ever sees them. It runs before rasterization; it can create new vertices when edges cross a boundary, and it works at a finer level than culling. Those three ideas are the whole foundation of the topic.
It’s also a useful reminder of how much invisible work a GPU performs on every frame. Clipping, the perspective divide, rasterization, shading — all of it fires millions of times per second. As rendering workloads grow heavier — higher resolutions, more complex scenes, AI-driven pipelines — the physical GPU carrying that work matters more, not less.
And a capable GPU only runs at its potential when the system around it supports it. A card running heavy rendering workloads needs adequate clearance inside the chassis, power delivery that matches its TDP, and airflow that can remove heat under sustained load. A tight case, an undersized PSU, or poor airflow can all cause an otherwise strong card to throttle — quietly capping the performance you paid for. If you’re building or expanding a rendering or GPU compute system, matching the card to a chassis designed to support it isn’t an afterthought. It’s what lets the hardware perform the way the spec sheet describes.
