Skip to content
CoreSource checked

Mipmapping

Samples prefiltered texture levels so distant surfaces avoid aliasing and cache waste.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Intermediate
Family
Texture Filtering
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
2
Code example
Ready
Visualization
Ready

Overview

Mipmapping stores a pyramid of downsampled texture images and selects or blends levels based on the screen-space footprint of each texture lookup.

Core Concepts

texture pyramidpixel footprintprefilteringlevel selection

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(1)

Average

O(pixels)

Worst

O(pixels)

Space

O(texture size)

When to Use

  • Use when textured surfaces can appear smaller than the original texture resolution.
  • Use when reducing shimmer, minification aliasing, and texture-cache pressure matters.

When Not to Use

  • Avoid when the texture is never minified or memory for extra levels is unavailable.
  • Avoid relying on mipmaps alone for highly anisotropic viewing angles.

What It Does

  • Samples prefiltered texture levels to reduce aliasing and improve cache behavior
  • Uses texture pyramid and pixel footprint to guide the work.
  • Produces rendered image.

Use Cases

  • Real-time graphics
  • Offline rendering
  • Lighting and visibility effects

Inputs

  • Scene geometry
  • Materials
  • Camera and lighting state

Outputs

  • Rendered image
  • Visibility or shading buffers

Key Formulas (1)

Mip level

level = log2(texturefootprint)
level = log2(texture_footprint)

Chooses a texture level based on projected pixel footprint.

Pseudocode

  1. 1.Generate downsampled texture levels
  2. 2.For each texture lookup, estimate the pixel footprint in texture space
  3. 3.Choose or blend nearby mip levels from that footprint
  4. 4.Sample the selected level with normal texture filtering
  5. 5.Return the filtered texel value

Canonical Example

Input
a brick wall texture viewed far away
Output
sample a smaller prefiltered mip level instead of the full-resolution image
Explanation
The smaller level averages many texels before sampling, reducing shimmer.

Implementation Notes

  • Build each level with proper filtering and color-space handling.
  • Use texture-coordinate derivatives to estimate level of detail.
  • Clamp or bias LOD deliberately for sharpness and stability.

Common Pitfalls

  • Generating levels in the wrong color space can blur or darken textures.
  • Missing edge handling can create seams in atlases.
  • Choosing a level only by distance ignores texture-coordinate derivatives.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show rays, samples, buffers, or shading terms that contribute to the final pixel.

Mipmapping mechanism walkthrough step 1 of 5
Step 1 of 5: Generate downsampled texture levels
rendering-mechanism

Notes

Mipmaps improve minification; anisotropic filtering is often needed for steep viewing angles.

Sources (1)

What each reference supports for this entry.

Williams 1983

Paper

Original mipmapping paper introducing pyramidal texture filtering.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Conceptual neighborImage Pyramid

Both store progressively lower-resolution image levels.

Raster pipelines use mipmaps to reduce texture aliasing.

Tags

GraphicsTexture MappingFilteringSampling