O'Reilly logo

WebGL Game Development by Sumeet Arora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding mipmapping

First, let's understand what texture filtering and mipmapping are. Take a close look at the following images. The image on the left shows the image of a monkey model with aliasing effects (look at the eyes of the monkey). On the right, we have an image of the same model with no such effects. When the object moves closer to the camera or moves further away from it, the texture associated with that object appears blocky or pixelated. Let's first understand why this happens. In our shader, we pass the image coordinates of the image. Now the shader interpolates texel values (texture pixels) and decides which pixel of the image to pick to be shaded on the screen. When the object is close to the viewer, each texel might become ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required