🗂️ The Depth Buffer: Deciding What’s in Front
When two surfaces cover the same pixel, the depth buffer decides which one you see. Watch it work, look inside it, and find out why distant surfaces flicker through each other.
When two surfaces cover the same pixel, the depth buffer decides which one you see. Watch it work, look inside it, and find out why distant surfaces flicker through each other.
How values are blended smoothly across a triangle, how a fragment shader turns them into a colour, and why perspective needs special care. Includes a live fragment shader editor.
How the graphics card decides which pixels a triangle covers, using three simple edge tests per pixel, and how it makes sure triangles that share an edge never overlap or leave gaps.
Row or column vectors? Row-major or column-major memory? Left- or right-handed? Depth from 0 or −1? Untangle the conventions that trip up everyone, and see which combinations really work.
The vertex shader runs once for every vertex, placing it on screen and passing data along. Edit one live: make waves, twist shapes and see exactly what it can and can’t do.
A game camera is just two matrices. See how the view matrix moves the world, how field of view, near and far shape the frustum, and how perspective differs from orthographic.
Every vertex travels through local, world, view, clip and screen space on its way to a pixel. Watch a whole scene morph through each space, and follow one point’s coordinates.
How a small grid of numbers can move, turn, stretch and mirror a whole mesh at once, why its columns tell you where the axes go, and why the order you combine them in matters.
Why every 3D object is built from triangles, what a vertex stores, how index buffers save memory, and how the order of a triangle’s corners decides which side is the front.
The six steps every graphics card follows to turn a list of triangles into a finished image. Step through each one, then count how often each shader really runs.
Every image on your screen is a grid of coloured squares made from red, green and blue light. Zoom into one, mix colours, and see where the image lives in memory.