Mipmap selection in too much detail

In this post, I want to shed some light on something I’ve been wondering about for a while: How exactly are mipmap levels selected when sampling textures on the GPU? If you already know what mipmapping is, why we use it, and what pixel derivatives ( ddx() / ddy() ) are, you can skip to the section Derivatives to mipmap levels . The post does, however, assume some knowledge of graphics programming.…