Skip to main content
Back to the graphics atlas
Sampling & reconstruction Technique Intermediate

Bilinear and Bicubic Interpolation

Reconstruct values between samples when resizing or sampling images, with different trade-offs between cost and smoothness.

graphicssamplingresizingtextures

Interactive playground

Tweak the operator or scene live so the article connects to an immediate visual result.

Interpolation sampler

Magnify a tiny texture with smoother reconstruction so the output no longer jumps between chunky source texels.

Base texture

Reference view

Magnified compare

Interactive compare

The output canvas compares bilinear on the left and bicubic on the right at the same magnification.

Family

Sampling & reconstruction

Resampling images, choosing mip levels, and reconstructing signals across scales.

Builds on

1 topic

Read these first if you want the surrounding pipeline context.

Unlocks

1 next topic

Use these follow-ups when you want to keep turning the image-processing pipeline forward.

Learning paths

1

This topic appears in curated graphics progressions so the next step is obvious.

Choose this over that

Nearest, bilinear, or bicubic reconstruction

Interpolation determines how zoomed or transformed images are reconstructed between known samples.

Current topic

Bilinear interpolation

Choose this when: You want a smooth, cheap interpolation baseline for many image and texture operations.

Choose something else when: Sharper reconstruction or simpler pixel-perfect stepping is the real priority.

Same topic

Bicubic interpolation

Choose this when: You want smoother gradients and often better perceived sharpness than bilinear can provide.

Choose something else when: The extra sample cost is not worth it for the use case.

Sampling & reconstruction Open topic

Mipmaps

Choose this when: The problem is minification stability across scales, not just one isolated interpolation step.

Choose something else when: You are only magnifying or resampling a single image once.

Problem

Images and textures are sampled on discrete grids, but rendering and resizing rarely land exactly on those original sample points. You need a reconstruction rule for the in-between values.

Intuition

Nearest-neighbor just picks the closest sample. Bilinear interpolation blends the nearest 2 x 2 neighborhood. Bicubic interpolation uses a wider neighborhood so the result can look smoother and often sharper, at extra cost.

Core idea

  • For bilinear interpolation, locate the four nearest samples and blend first in one axis, then the other.
  • For bicubic interpolation, evaluate a cubic reconstruction over a larger support such as 4 x 4 samples.
  • The bigger support captures more local shape but costs more work per result pixel.

Worked example

Upscaling pixel art with nearest-neighbor keeps hard blocks. Bilinear softens the block edges. Bicubic tends to produce smoother gradients and less visibly piecewise transitions, though it may also overshoot in some settings.

Complexity

Both methods are constant work per output pixel, but bilinear uses four samples while bicubic uses a wider neighborhood and more arithmetic.

When to choose it

  • Choose bilinear as a common default when you want smooth, cheap reconstruction.
  • Choose bicubic when you can afford more samples for a smoother upscale or reconstruction.
  • Choose mipmaps when the problem is minification stability across scale, not just single-scale interpolation quality.

Key takeaways

  • Interpolation is the rule that fills in values between known samples.
  • Bilinear is cheap and smooth enough for many tasks.
  • Bicubic uses more context and often yields a higher-quality upscale.
  • Sampling quality and mip selection are related but distinct questions.

Practice ideas

  • Upscale the same low-resolution image with nearest, bilinear, and bicubic reconstruction.
  • Inspect which method keeps gradients smoother and which one preserves hard blocks more faithfully.
  • Combine interpolation with gamma-aware processing and compare the result to naive interpolation in display space.

Relation to other topics

  • Mipmaps solve the scale-selection problem that often appears before interpolation even begins.
  • Color spaces and gamma matter because interpolation should ideally happen in an appropriate numeric space.
  • Texture sampling in real renderers combines interpolation with filtering across multiple mip levels.

Build on these first

These topics supply the mental model or preceding stage that this page assumes.

What this enables

Once the current operator feels natural, these are the most useful follow-up jumps.

Related directions

These topics live nearby conceptually, even if they are not strict prerequisites.

More from Sampling & reconstruction

Stay in the same family when you want parallel operators built from the same mental model.

Paths that include this topic

Follow one of these sequences if you want a guided next step instead of open-ended browsing.

Sampling and textures

Learn how image data is resampled, reconstructed, and stabilized across magnification and minification.

From the blog

Pair the graphics atlas with recent writing from the broader site whenever you want a wider engineering lens.