Core guide

Texture filtering

Choose nearest or linear sampling for each texture.

Live example

See Texture filtering in action

Compare nearest sampling on the left with linear sampling on the right.

live rendering loading ticks 0

How it works

Set filtering when a texture or font atlas is created. The renderer reuses samplers internally; Phase 2 does not generate mipmaps.

Public types

  • TextureFilteringOptions
  • TextureFilter = "nearest" | "linear"
  • WebGpuTexture

Minimum viable example

const handle = await assets.load_texture(blob, {
  magnification: "nearest",
  minification: "linear",
});

Scope and limitations

Mipmapped and anisotropic filtering are deferred.