Skip to content

✖️ The Cross Product: Finding the Direction at Right Angles

Give the cross product two directions and it hands back a third, at right angles to both. It’s how graphics finds which way a triangle faces, which side of a line a point is on, and how cameras get their axes.

22 November 2026 · ~9 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

💡 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