Finding the MIP level
What we'd like to find is the step size that a uniform step in screen-space causes in three-space, or, in other words how a screen-space change relates to a 3-space change. This sounds like the derivatives, ( du/dt, dv/dt ). They can be computed simply using the chain rule:

Notice that the term being squared under the numerator is just the w plane equation that we are already computing. The remaining terms are constant for a given rasterization. Thus all we need to do to compute the derivative is a square the w accumulator and multiply it by a couple of constants.

Now, we know how a step in screen-space relates to a step in 3-space. So how do we translate this to an index into our MIP table?

Lecture 22 Slide 8 6.837 Fall '98