Pro OpenGL ES for iOS

(singke) #1

CHAPTER 5: Textures (^155)
Figure 5-19. Two images, both mipmapped, but one’s better looking. What gives?
You’ve probably noticed that the two images look a little different. The top image is
shimmery, and the bottom image is noticably smoother, making it easier to look at. That
brings me to the topic of filtering.
Filtering
An image, when used as a texture, may exhibit various artifacting depending on its
content and final size when projected onto the screen. Very detailed images might be
seen with an annoying shimmering effect. However, it is possible to dynamically modify
an image to minimize these effects through a process called filtering. Filtering is typically
used in conjunction with mipmapping because the former can make use of the latter’s
multiple images.
Let’s say you have a texture that is 128 ̄128 but the texture face is 500 pixels on a side.
What should you see? Obviously the image’s original pixels, now called texels, are going
to be much larger than any of the screen pixels. This is a process referred to as
magnification. Conversely, you could have a case where the texels are much smaller

Free download pdf