Skip to content

⚫ The Dot Product: How Much Do Two Directions Agree?

One tiny calculation, three multiplications and two additions, answers ‘do these point the same way?’. It’s behind lighting, field-of-view checks and much more. Drag two arrows and see.

22 November 2026 · ~8 min read · 2 interactive demos

💎 Flat Shading with ddx and ddy: Normals from Nowhere

Build each triangle’s normal in the fragment shader from ddx and ddy of its position: a faceted, low-poly look with no extra mesh data. Plus more uses for derivatives.

22 November 2026 · ~6 min read · 1 interactive demo

🌑 Shadow Mapping: Seeing the Scene from the Light

How games draw shadows: render the scene’s depth from the light’s point of view, then check every pixel against it. See the shadow map itself, and the acne, jaggies and blur that come with it.

21 November 2026 · ~8 min read · 1 interactive demo

🧱 Normal Mapping: Detail Without Triangles

A flat square can look like a bumpy brick wall if each pixel lies about which way it faces. See how normal maps store those directions, and why they’re always blue.

21 November 2026 · ~9 min read · 1 interactive demo

🌗 sRGB and Gamma: Why 50% Grey Isn’t Half as Bright

The numbers in an image aren’t amounts of light. Find the grey that really is half as bright, then see what goes wrong when blending and lighting ignore it.

20 November 2026 · ~9 min read · 2 interactive demos

💡 Basic Lighting: Ambient, Diffuse and Specular

How a shader fakes light with three simple terms: ambient, diffuse and specular. Learn Lambert’s cosine law, the Blinn-Phong highlight, and why lighting per pixel beats lighting per vertex.

19 November 2026 · ~10 min read · 2 interactive demos