Skip to content

🎚️ Interpolation: Lerp, Smoothstep and Easing

Blending smoothly from one value to another is everywhere in graphics: colours, positions, textures, animation. Meet lerp, its reverse, remapping, smoothstep and easing curves.

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

👻 Helper Pixels: The Hidden Cost of ddx and ddy

The rules for using ddx and ddy safely, and helper pixels: the extra, invisible fragment shader runs that 2×2 groups need. See them on your own GPU.

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

💎 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

🧰 Using ddx and ddy: Mipmaps and Smooth Edges

The two uses of ddx and ddy you’ll meet most: choosing a texture’s mipmap level, and smooth edges at any zoom with fwidth. With live WebGL demos.

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

📐 ddx and ddy Explained: Shader Derivatives, Pixel by Pixel

What ddx and ddy (dFdx and dFdy in GLSL) tell a shader, and how the graphics card works them out by comparing neighbouring pixels in 2×2 groups, with interactive WebGL demos.

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

⚙️ How GPUs Run Shaders: Lockstep, Divergence and Hiding Latency

A graphics card runs shaders in groups of 32 or 64 that all execute the same instruction at once. See what that means for if statements, and how GPUs hide slow memory by juggling groups.

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

🌀 Ray Marching: Drawing 3D Worlds with Distance Functions

With a 3D distance function, a fragment shader can draw a whole scene without a single triangle: march a ray from each pixel, jumping as far as the distance allows. Watch the jumps, then explore a live scene. Part 4 of the signed distance fields series.

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

🫠 Combining SDFs: Unions, Smooth Blends and Bending Space

Two lines of maths join, cut and melt shapes together, and a few more repeat, mirror and twist them, endlessly, for free. Part 2 of the signed distance fields series.

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

🔵 Signed Distance Fields: Shapes Made of Distances

Describe a shape by how far every point is from its edge, and you get crisp edges at any size, easy outlines and much more. See how circles, boxes, lines and polygons are written as distance functions.

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

💡 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

🎨 Fragment Shaders: Colouring Every Pixel

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.

17 November 2026 · ~11 min read · 3 interactive demos