Yep.
So the farther away the texture is, it is replaced by smaller interpolated versions of the same texture? Or how is this understood?
You’ve got it. For the basic “why use MIPmaps” concept, please don’t think there’s something super subtle in here. What you said before is correct. As an object gets further and further away, there are more texels in the base map behind each screen pixel that need added up and averaged (i.e. integrated), to the point where you’ve got the entire bloody texture behind one pixel and you have to add every texel up and compute an average.
But with MIPmaps, you can use some “pre-averaged” (i.e. pre-integrated) smaller-res versions of the texture to save a lot of that averaging work. To the point where if the entire texture is exactly behind a single pixel, you can just use the 1x1 MIPmap level for your answer and be done with it.
I’m glossing over some subtleties but in a nutshell that’s it!
Think of it as a “texels per pixel” question. When rendering:
- When you have 1 base map texel per pixel, you (the GPU) uses the base map (MIPmap level 0).
- When you have 2 base map texels per pixel, you use MIPmap level 1 (which for MIPmap 1 would be 1 texel per pixel).
- When you have 4 base map texels per pixel, use MIPmap level 2 (which for MIPmap 2 would be 1 texel per pixel). etc.
Seeing a pattern here? The job of the GPU when using MIPmaps is to filter out an approximately 1 texel/pixel result from your texture.
When you completely gel this, I’m sure you’ll think of other questions. But just keep the above mind as a mental model (a jumping off point). Follow-on topics you might be interested in: texturing surfaces viewed edge-on (anisotropic texture filtering), vendor filtering cheats.