🧰 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.
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.
Trilinear filtering turns floors and roads seen at a low angle into blur. Anisotropic filtering fixes it by sampling along the pixel’s stretched footprint. Compare them side by side.
Distant textures sparkle and swirl because each pixel covers many texels. Mipmaps fix it with pre-shrunk copies of the texture. Build a mip chain, then drive over a floor with and without one.