Skip to content

馃懟 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鈥檚 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鈥檒l meet most: choosing a texture鈥檚 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