Ambient occlusion is a rendering technique that darkens areas where nearby geometry blocks indirect light, such as corners, crevices, the gaps between objects and the ground directly beneath a character. In gaming, it appears among the graphics settings as an option that adds depth, contact and solidity to a scene, usually at a moderate cost in frame rate.
The effect approximates something real: in a room lit by a cloudy sky or by light bouncing off walls, a narrow corner receives less light from the surrounding hemisphere than an open floor. Without ambient occlusion, objects in a game often look as if they float above surfaces instead of resting on them.
How ambient occlusion estimates blocked light
For each visible point, ambient occlusion asks one question: how much of the surrounding hemisphere is open, and how much is blocked by nearby surfaces? The answer is an occlusion factor between 0 and 1 that scales the ambient or indirect light reaching that point. A flat open floor scores close to 1, while the inside of a narrow crack scores much lower.
Real-time techniques do not trace the full scene. They examine a limited sampling radius, typically a fraction of a meter to a few meters in world units, because distant geometry has little influence on contact shadowing. Most methods then apply a blur or denoising pass to remove the grainy pattern caused by using few samples per pixel.
The parameters below control how the effect looks and how much it costs. Games rarely expose all of them, but they explain why the same setting can look subtle in one title and heavy in another.
| Parameter | What it controls | Effect of increasing it |
|---|---|---|
| Radius | How far the algorithm looks for occluders | Broader, softer darkening; more cost |
| Sample count | Number of directions tested per pixel | Less noise; higher GPU load |
| Intensity | Strength of the darkening | Deeper contrast; risk of a dirty look |
| Resolution | Internal buffer size, often half or full | Sharper detail; more memory and time |
| Temporal accumulation | Reuse of results from earlier frames | Smoother output; possible ghosting |
Common ambient occlusion techniques
Several generations of algorithms coexist in game menus, and their names often appear directly as setting values. They differ mainly in how they gather occlusion data and in how close they come to physically based results.
| Method | How it works | Quality | Typical cost |
|---|---|---|---|
| SSAO | Samples the depth buffer around each pixel | Basic, can halo edges | Low |
| HBAO and HBAO+ | Measures the open horizon angle in screen space | Better contact detail | Low to moderate |
| GTAO | Horizon-based method calibrated against reference results | Accurate and stable | Moderate |
| Baked AO | Precomputed into textures or lightmaps offline | Clean but static | Very low at runtime |
| RTAO | Traces short rays against scene geometry | Highest, works off-screen | High |
The screen-space family, which includes SSAO, HBAO and GTAO, works only with what the camera currently sees. That makes it fast, but occluders hidden behind other objects or outside the frame cannot contribute. Ray-traced ambient occlusion removes that limitation because rays test real scene geometry, which explains its connection to the wider ray tracing settings.
Many games combine methods. Artists often bake ambient occlusion into textures for fine surface detail such as panel seams or fabric folds, and a real-time screen-space pass then handles dynamic contact between moving objects, such as a character standing next to a wall. This layered approach keeps static detail cheap while still reacting to animation.
Performance cost and how to choose a setting
Ambient occlusion is usually a mid-cost setting. Screen-space variants commonly reduce frame rate by a few percent, while ray-traced versions can cost considerably more, depending on resolution, sample count and the GPU. Because the work scales with pixel count, render scale and upscalers such as DLSS, FSR or XeSS also lower its cost.
The following decision table matches common situations with a sensible choice. It assumes a game that offers several ambient occlusion options.
| Situation | Recommended choice | Reason |
|---|---|---|
| Low-end GPU, competitive play | Off or basic SSAO | Frame rate and clarity matter more |
| Mid-range GPU, single-player game | HBAO+ or GTAO | Strong visual gain at modest cost |
| High-end GPU with ray tracing | RTAO or full path tracing | Most accurate contact shadows |
| Visible halos or flickering | Switch to another method | Artifacts often depend on the algorithm |
| Handheld PC on battery | Low or off | Saves power and thermal headroom |
One interaction is worth knowing. When a game enables path tracing or full ray-traced global illumination, a separate ambient occlusion setting is often disabled or ignored, because occlusion then emerges naturally from the lighting simulation.
Visual artifacts and common misconceptions
Ambient occlusion is an approximation, not a shadow from a light source. It ignores light direction entirely, so it cannot replace the directional shadows governed by shadow quality settings. The two effects complement each other: shadows show where a light is blocked, while ambient occlusion shows where diffuse light struggles to reach.
- Haloing: dark outlines around characters seen against distant backgrounds, typical of simple SSAO.
- Screen-edge loss: occlusion fades near the borders of the frame because the required depth data is missing.
- Noise and shimmer: low sample counts produce grain that temporal filtering must hide.
- Over-darkening: excessive intensity makes scenes look dirty and flattens readable detail.
- Ghosting: temporal reuse can leave faint trails behind fast-moving objects.
A frequent misconception holds that stronger is always better. Physically, occlusion is subtle in bright, open environments, so heavy darkening on outdoor scenes reduces realism instead of adding it.
A non-technical view
Look at the corner where two walls meet the floor in any room. It is a little darker than the middle of the wall, even with no lamp casting a shadow there. Light simply has a harder time reaching tight spaces.
Ambient occlusion copies this everyday effect in games. It adds soft darkening in corners, folds and gaps, so objects look grounded and the scene gains depth. The key takeaway is that it makes a game world feel solid, at the price of some performance.
A concrete example
A player runs a detailed single-player adventure at 1440p on a mid-range graphics card and reaches about 72 frames per second with ambient occlusion set to GTAO. In a dense forest scene, the effect darkens the ground beneath ferns, the gaps between rocks and the folds of a character’s coat, which makes the vegetation look rooted in the soil rather than pasted on top.
Curious about the cost, the player switches ambient occlusion off and gains roughly six frames per second, but the forest immediately looks flatter and the character appears to hover slightly above the path. The player restores GTAO and instead lowers draw distance one step, which recovers similar performance while keeping the depth that ambient occlusion provides.