Mipmapping

Before we can discuss the remaining filter modes that are only applicable to TEXTURE_MIN_FILTER, we need to introduce a new concept: mipmapping.

A problem arises when sampling minified textures. In cases where we use LINEAR filtering and the sample points are so far apart, we can completely miss some details of the texture. As the view shifts, the texture fragments that we miss change, which results in a shimmering effect. You can see this in action by setting the MIN filter in the demo to NEAREST or LINEAR, zooming out, and rotating the cube:

To avoid this, graphics cards can utilize a mipmap chain.

Mipmaps are scaled-down copies of a texture, with each copy being exactly half the size of the previous one. If you were to show a texture and all of its mipmaps in a row, it would look like this:

The advantage is that when rendering, the graphics hardware can choose the copy of the texture that most closely matches the size of the texture on screen and samples from it instead. This reduces the number of skipped texels and the jittery artifacts that accompany them. However, mipmapping is only used if you use the appropriate texture filters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.186.164