Anisotropic filtering

On this page 7

Anisotropic filtering (often shortened to AF) is a texture filtering technique that preserves detail on surfaces viewed at oblique angles, such as roads, floors and walls stretching away from the camera. Among graphics settings in games, it is usually offered as a level from 2x to 16x, and it removes the blur that simpler filtering methods produce on distant, angled textures.

The word anisotropic means direction-dependent. The technique recognizes that a screen pixel covering a tilted surface corresponds to a long, narrow footprint in the texture, not a square one, and samples the texture along that elongated shape. In gaming, it is one of the cheapest settings for a visible gain in image clarity.

How anisotropic filtering samples textures

Anisotropic filtering works by taking multiple texture samples along the axis of distortion for each pixel. When a surface recedes into the distance, one pixel on screen may cover many texels in one direction but only a few in the other, and AF gathers samples across that stretched area before blending them.

The technique builds on mipmapping, which stores progressively smaller, pre-filtered copies of each texture. Basic filtering chooses a mipmap level based on the largest dimension of the pixel footprint, which picks a low-resolution copy and blurs the surface. AF instead selects a sharper mipmap level based on the shorter dimension and compensates with extra samples along the longer one.

The anisotropy ratio describes how elongated the footprint is. A setting of 16x allows the GPU to handle footprints up to sixteen times longer than they are wide, which covers almost every viewing angle that occurs in normal gameplay. Modern GPUs apply AF adaptively, taking only as many samples as each pixel actually needs.

The table below lists the main AF levels and what each one achieves.

LevelMaximum anisotropy ratioVisible resultRelative cost
Off1:1 (trilinear only)Distant floors blur quicklyLowest
2x2:1Noticeable improvement near the cameraVery low
4x4:1Clear mid-distance surfacesLow
8x8:1Sharp detail at most anglesLow
16x16:1Near-maximum clarity at steep anglesLow to moderate
Anisotropic filtering levels and their effect

Anisotropic filtering compared with other texture filters

Anisotropic filtering is the highest-quality standard texture filter in real-time rendering, sitting above bilinear and trilinear filtering. Each method answers the same question, which is how to compute a pixel color from a texture that does not map one-to-one onto the screen.

Bilinear filtering blends the four nearest texels within one mipmap level. Trilinear filtering adds a blend between two adjacent mipmap levels, which hides visible seams where one level switches to the next. Neither accounts for viewing angle, so both treat the pixel footprint as roughly square.

The following table compares these filtering methods.

MethodSamples per pixelHandles oblique anglesTypical artifact
Nearest neighbor1NoBlocky, shimmering pixels
Bilinear4NoVisible mipmap transition lines
Trilinear8NoBlur on angled surfaces
AnisotropicUp to 128 at 16xYesMinimal, slight shimmer on fine patterns
Texture filtering methods compared

AF is often confused with anti-aliasing, but the two solve different problems. Anti-aliasing smooths jagged geometry edges, while anisotropic filtering sharpens texture detail inside surfaces. Likewise, texture quality controls the resolution of the source textures, whereas AF controls how those textures are sampled at angles.

Performance cost and memory bandwidth

On current hardware, anisotropic filtering has a small performance cost, typically a few percent of frame rate at 16x and often less than measurement noise. The extra samples consume memory bandwidth and texture unit throughput rather than shader compute power.

The cost was significant on early-2000s GPUs, which is why AF gained a reputation as an expensive option. Dedicated texture units and adaptive sampling have since made it inexpensive. The cost can still rise on bandwidth-limited systems, such as integrated graphics, older handheld consoles and mobile devices with shared memory.

The table below shows how platform type influences the practical choice of AF level.

PlatformRecommended levelReason
Dedicated desktop GPU16xCost is negligible on modern texture units
Gaming laptop GPU8x to 16xLow cost, worth keeping high
Integrated graphics4x to 8xShared memory bandwidth is limited
Handheld PC or console4x to 8xBalances battery life and clarity
Mobile device2x to 4xBandwidth and power are constrained
Recommended AF levels by platform

Configuring anisotropic filtering in practice

Anisotropic filtering can be set in the game menu or forced through the GPU driver control panel. The in-game setting is generally preferred because the engine applies it correctly to each texture type, while a driver override applies it globally and can occasionally conflict with special effects.

A sound default for most PC players is 16x in every game, followed by lowering other settings first if performance is insufficient. Shadow quality, ray tracing and render scale have a far greater impact on frame rate, so reducing AF is rarely the most efficient optimization.

The decision table below summarizes common situations and the appropriate response.

SituationRecommended actionWhy
Distant ground looks blurryRaise AF to 16x in the game menuRestores detail at steep angles
Game lacks an AF optionForce 16x in the driver panelOverrides the engine default
Driver override causes artifactsReturn control to the applicationAvoids conflicts with effects
Frame rate is too lowLower shadows or render scale firstAF saves very little performance
Running on integrated graphicsTest 8x against 16xBandwidth may make a difference
Practical decisions for AF settings

Limitations and common misconceptions

Anisotropic filtering cannot add detail that the texture does not contain. If the source texture resolution is low, AF only ensures that the low-resolution texture remains as sharp as possible at an angle; it cannot replace higher texture quality.

  • Misconception that AF is expensive: on modern GPUs the impact is usually only a few percent.
  • Confusion with anti-aliasing: AF does not remove jagged edges on geometry.
  • Shimmering on fine patterns: very sharp filtering can reveal aliasing in high-contrast textures, which temporal techniques then need to smooth.
  • Inconsistent driver overrides: forcing AF may not apply to textures that the engine samples in unusual ways.
  • Assuming higher always looks better: the visual gain from 8x to 16x is small and visible mainly on long, flat surfaces.

In short, AF is a low-risk, high-value setting whose limitations come mainly from the textures and the rendering pipeline around it, not from the filter itself.

Stripped to the essentials

In a game, every surface is covered with an image called a texture. When you look at a floor or road that stretches far ahead, that image gets squashed by perspective, and the game can make it look smeared and blurry.

Anisotropic filtering fixes this. It looks more carefully at the squashed part of the image and keeps the details crisp, much like reading a sign at an angle by tilting your head instead of squinting. The key takeaway is simple: on almost any modern computer or console, turning it to the highest level makes the game look sharper while costing very little speed.

Where it is applied

A player runs a racing game on a mid-range desktop PC at 1440p and notices that the asphalt and lane markings turn into a gray smear about twenty meters ahead of the car. The graphics menu shows anisotropic filtering set to 2x, a conservative default applied by the automatic preset.

After changing the setting to 16x, the road texture stays sharp all the way to the horizon, and lane markings remain readable at high speed. The frame rate drops from about 118 to 116 frames per second, a change the player cannot feel. The outcome is a clearly sharper image for almost no performance cost, which is why experienced players set AF to maximum before adjusting any other graphics setting.