You copied the Doc URL to your clipboard.

2.12. Use mipmapping

Mipmapping is a very useful technique that:

  • reduces memory bandwidth usage

  • increases texture cacheability

  • increases image quality

  • potentially provides very large performance gains.

When your application draws an object on screen, the image drawn can be very different in size. It can range from filling the screen to being a small object in the distance.

If a single texture is used, the density that the texture is sampled at, or texture sampling density, is only correct when the object drawn is similar to the size of the texture. If the object size and the texture size do not match, the texture sampling density is incorrect. This produces artifacts that reduce image quality.

Mipmapping gets around this problem by taking a high resolution texture and scaling it to multiple smaller sizes known as mipmap levels. When an object is drawn with mipmapping enabled, the texture with the closest size to the object is used. This means the object always has a texture of a matching size to take samples from and the texture sampling density is therefore correct. This reduces image artifacts and produces a higher quality image.

If the texture sampling density is correct, the texels that are sampled are close to one another in memory. This means the texture data is more cacheable. Increased cacheability reduces memory bandwidth usage and increases performance.

You can instruct the Mali GPU driver to generate mipmaps at runtime or you can pre-generate the mipmaps with the Mali GPU Texture Compression Tool.

Mipmapping requires about 33% more memory than a non-mipmapped texture.

Note

You can generate mipmaps from uncompressed textures in OpenGL ES with a single line of code. This is an easy way to improve the performance of memory bandwidth limited applications.

Was this page helpful? Yes No