Learn how game graphics really work, by playing with them.
Fragment Shack explains the techniques behind video game visuals, one short post at a time. Every post is built around interactive demos, most of them running live on your own graphics card, with a peek under the hood at what the hardware is doing. Written for beginners: no maths or programming experience needed.
Why Fragment Shack?
🕹️ Demos you can break
Every idea comes with sliders, buttons and things to drag, most of them running live on your own graphics card. Change a number and see what happens.
🔧 Under the hood
Each post explains what the hardware and driver are actually doing, because that's where the "why" usually lives.
⏱️ About 10 minutes a post
One idea per post, in plain English, with no maths beyond what's explained on the page. Read them in order, or dip in anywhere.
Try it right now
This triangle is being drawn by your graphics card at a deliberately tiny resolution, then enlarged so you can see every pixel. Drag the slider to change how many pixels it gets.
Why do the edges turn into staircases? Which pixels count as "inside"? How do the colours blend smoothly between the corners? Graphics Fundamentals answers all of it.
Start here: Graphics Fundamentals
All 12 parts »How a graphics card turns a list of triangles into a picture. From pixels and meshes through matrices, cameras and shaders to depth and lighting. No experience needed.
Then go deeper
Maths for Graphics Beginner · read any time
The handful of maths ideas that graphics programming is built on, explained gently with things to drag around. Vectors, dot and cross products, angles and waves, blending between values, and rays. No maths background needed.
Part 1
🧭 Coordinates and Vectors
Part 2
⚫ The Dot Product
Part 3
✖️ The Cross Product
Part 4
〰️ Angles, Sine and Cosine
Part 5
🎚️ Interpolation
Part 6
🎯 Rays and Intersections
Textures & Sampling Beginner
How images get wrapped onto 3D surfaces, and how the graphics card reads them without shimmering, blurring or banding. UVs, filtering, mipmaps, anisotropic filtering and colour spaces.
Part 1
🧵 Textures and UV Coordinates
Part 2
🔍 Texture Filtering
Part 3
🪆 Mipmaps and Trilinear Filtering
Part 4
🛤️ Anisotropic Filtering
Part 5
🌗 sRGB and Gamma
Render Targets & Post-Processing Intermediate
Drawing into textures instead of the screen, and what that makes possible. Transparency, blur, bloom, tone mapping, anti-aliasing and the full-screen passes behind a game's final look.
Part 1
🖼️ Render Targets
Part 2
🫧 Alpha Blending
Part 3
🌫️ Blur and Convolution
Part 4
☀️ HDR, Tone Mapping and Bloom
Part 5
🪚 Anti-Aliasing
Lighting & Shadows Intermediate
Making surfaces look detailed and solid. Bumps without extra triangles from normal maps, and shadows drawn by looking at the scene from the light's point of view.
Part 1
🧱 Normal Mapping
Part 2
🌑 Shadow Mapping
Shader Techniques Intermediate
Specific tricks shaders use, explained one at a time. Derivatives (ddx and ddy), and signed distance fields, from simple shapes to crisp text and whole 3D worlds drawn without triangles.
Part 1
📐 ddx and ddy Explained
Part 2
🧰 Using ddx and ddy
Part 3
💎 Flat Shading with ddx and ddy
Part 4
🔵 Signed Distance Fields
Part 5
🫠 Combining SDFs
Part 6
🔤 SDF Text
Part 7
🌀 Ray Marching
GPU Performance Intermediate
What makes drawing fast or slow, and what the graphics card is really doing about it. How thousands of shader copies run in lockstep, the hidden cost of helper pixels, and why drawing the same pixel twice costs time.
Part 1
⚙️ How GPUs Run Shaders
Part 2
👻 Helper Pixels
Part 3
🖌️ Overdraw