Volumetric fog

On this page 7

Volumetric fog is a real-time rendering technique that simulates how light is scattered and absorbed by particles suspended in the air, so that fog, dust, smoke and haze occupy actual three-dimensional space instead of being painted over the image as a flat tint. In the graphics settings of modern games, it is the option that produces visible light shafts, glowing halos around lamps and depth-dependent haze that reacts to shadows.

Because it evaluates lighting at many points inside a volume rather than only on surfaces, volumetric fog is one of the more expensive options in a typical menu. Its cost, quality and visual character depend on the resolution of the underlying grid, the number of lights it samples and the temporal filtering that smooths the result.

How volumetric fog simulates light in the air

Volumetric fog works by dividing the space visible to the camera into a three-dimensional grid of cells and computing, for each cell, how much light arrives there and how much of it is redirected toward the viewer. Most current engines use a froxel grid, a set of frustum-aligned voxels whose slices grow thicker with distance, so that nearby air receives more detail than the far horizon.

The computation follows a simplified form of the radiative transfer equation. Each cell stores a density value and a scattering coefficient; the engine then gathers light from the sun, local lights and ambient sources, checks shadow maps to decide whether each light is blocked, and applies a phase function such as Henyey-Greenstein to describe whether light scatters mostly forward or evenly in all directions. A final ray marching pass accumulates the scattered light and the loss of transmittance along each view ray.

The following table lists the stages of a typical froxel-based pipeline and what each stage contributes to the final image.

StageWhat it computesMain cost driver
Density injectionFog amount per cell from global settings and local volumesGrid resolution
Light scatteringIncoming light per cell, including shadow testsNumber of shadowed lights
Temporal reprojectionBlending of current and previous frames to hide noiseMemory bandwidth
IntegrationAccumulated light and transmittance along each view rayNumber of depth slices
CompositionApplication of fog to the lit sceneScreen resolution
Stages of a froxel-based volumetric fog pipeline

Quality levels and parameters in the settings menu

A volumetric fog quality setting usually changes grid resolution, sample count and filtering rather than switching the effect on or off. Lower presets shrink the froxel grid, reduce the number of depth slices and sample fewer lights, which makes the effect softer, blockier near edges and more prone to light leaking through thin walls.

Exact values differ between engines, but the table below shows the typical scaling pattern that many titles follow. The grid sizes are representative orders of magnitude, not fixed standards.

PresetRepresentative gridVisual resultRelative cost
OffNone, flat distance fog onlyNo light shafts, uniform hazeNegligible
LowAbout 80 x 45 x 64 cellsSoft, blurry shafts with visible flickerLow
MediumAbout 160 x 90 x 64 cellsClear shafts, mild shimmeringModerate
HighAbout 160 x 90 x 128 cellsStable, detailed shaftsHigh
UltraAbout 240 x 135 x 128 cells or moreFine detail around small lightsVery high
Typical volumetric fog presets and their effect

Some games expose further parameters: fog density, which controls how thick the air looks; anisotropy, which controls how strongly light scatters forward; and local light contribution, which decides whether flashlights and lamps also cast volumetric beams. Raising the density is an artistic choice, while raising the resolution is a performance choice.

Volumetric fog differs from older fog techniques because it responds to shadows and light direction, whereas classic distance fog only blends pixels toward a color based on depth. It also overlaps with several neighboring options in the graphics menu, which players sometimes confuse with it.

EffectHow it worksReacts to shadowsTypical cost
Volumetric fog3D grid of scattering cellsYesModerate to high
Distance fogDepth-based color blend per pixelNoVery low
Screen-space god raysRadial blur from a bright light on screenPartly, only on screenLow
Volumetric cloudsRay marching through a separate cloud layerYesHigh
BloomBlur of bright pixels into neighborsNoLow
Volumetric fog and similar atmospheric effects

Volumetric fog also interacts with shadow quality, because the light shafts are only as sharp as the shadow maps they sample. When ray tracing or path tracing is enabled, some engines replace or supplement the froxel approach with traced volumetric samples, which improves accuracy but multiplies the cost.

Performance cost and practical configuration

On current hardware, volumetric fog usually costs between a few percent and roughly 20 percent of frame rate, depending on the engine, the preset and how many shadowed lights are visible. Dense urban night scenes with many lamps are the most demanding cases, while open daylight scenes with a single sun light cost far less.

Because the froxel grid is largely independent of screen resolution, its relative cost is higher at 1080p than at 4K, and upscalers such as DLSS, FSR and XeSS do not reduce it as much as they reduce surface shading. The table below suggests starting points for common situations.

SituationRecommended settingReason
Competitive multiplayerLow or offFog can hide opponents and costs frames
Single-player on a capable GPUHighStrong atmosphere with stable shafts
Handheld gaming PCLowLimited power budget and small screen
Frame rate below targetMediumOften recovers frames with modest loss
Visible flicker or bandingRaise one stepHigher grids reduce temporal noise
Choosing a volumetric fog setting

A useful method is to test in a scene with strong light shafts, such as a forest at sunrise or an interior with windows, and to compare frame times rather than average frame rate alone. Turning the effect off entirely often changes the mood and readability of a scene far more than expected, because many artists design lighting around it.

Limitations, artifacts and common misconceptions

The most frequent problems with volumetric fog come from its low spatial resolution and heavy temporal filtering. Because each froxel covers many pixels, the engine relies on reprojection across frames, which can create ghosting trails behind moving lights and characters.

  • Light leaking: thin geometry is smaller than a froxel, so light appears to bleed through walls or doors.
  • Banding and stepping: too few depth slices produce visible layers in thick fog, usually hidden with dithering noise.
  • Temporal shimmer: fast camera motion breaks reprojection and makes shafts flicker for a moment.
  • Misconception about upscaling: lowering render scale does not reduce volumetric cost proportionally.
  • Misconception about realism: higher density is not more realistic; it is an artistic parameter chosen by the developer.

None of these artifacts indicate a hardware fault. They are inherent trade-offs of approximating a continuous physical medium with a coarse grid in a few milliseconds per frame.

In everyday language

Volumetric fog makes the air in a game look like it has something in it. Think of sunlight streaming through a dusty window, or car headlights cutting through a misty night. Without this setting, fog is just a flat gray layer laid over the picture. With it, the fog sits in real space, and light beams appear where light actually passes through it.

The catch is that the computer has to calculate light at thousands of small boxes of air every frame. Higher settings look smoother but cost more speed, so players often lower it when a game runs slowly.

Seen in the real world

A player runs an open-world adventure game at 1440p on a mid-range graphics card and reaches about 52 frames per second in a foggy swamp at dawn, short of a 60 fps target. Lowering texture quality makes no difference, so the player opens the graphics settings and moves volumetric fog from Ultra to Medium.

The frame rate rises to about 61 fps in the same spot, while the sun shafts through the trees remain visible, only slightly softer and with faint shimmer during fast turns. Setting it to Off would add a few more frames, but the swamp then looks flat and evenly gray. The player keeps Medium as the best balance between atmosphere and smoothness.