Papers
Topics
Authors
Recent
Search
2000 character limit reached

Horizon-Based Ambient Occlusion (HBAO)

Updated 9 April 2026
  • HBAO is a real-time rendering technique that approximates ambient occlusion by integrating horizon data over a surface hemisphere.
  • It employs an advanced visibility bitmask to discretize occlusion into sectors, efficiently handling thin geometries and multi-directional lighting.
  • Quantitative evaluations show that HBAO delivers high visual fidelity with minimal performance overhead compared to classical methods.

Horizon-Based Ambient Occlusion (HBAO) is a screen-space technique for approximating ambient occlusion (AO), essential for visually plausible global illumination in real-time rendering. HBAO analytically integrates local geometric occlusion by evaluating visibility across a hemisphere over the surface normal, traditionally reducing the AO integral to a series of horizon-angle slices. Recent advancements extend this framework with the introduction of a visibility bitmask, offering robust handling of thin geometry and multi-directional light probes with minimal performance overhead (Therrien et al., 2023).

1. Classical HBAO Formulation

Let V(p,ω){0,1}V(p,\omega)\in\{0,1\} denote the binary visibility at point pp along direction ω\omega on the hemisphere Ω+\Omega^+ above pp. The ambient occlusion at pp is given by:

A(p)=Ω+V(p,ω)(npω)dωA(p) = \int_{\Omega^+} V(p,\omega)\, (n_p\cdot\omega)\, d\omega

Expressed in spherical coordinates (θ,ϕ)(\theta,\phi) about npn_p:

A(p)=02π0π/2V(p,θ,ϕ)cosθsinθdθdϕA(p) = \int_{0}^{2\pi} \int_{0}^{\pi/2} V(p,\theta,\phi)\,\cos\theta\,\sin\theta\,d\theta\,d\phi

HBAO approximates this by dividing the integral into pp0 azimuthal slices pp1. For each slice, depth samples are taken outward to locate occlusion “horizons,” i.e., maximum and minimum elevation angles pp2. The inner pp3 integral is then analytically computed over the non-occluded regions, yielding per-slice contributions:

pp4

The AO is then assembled as

pp5

This reduction achieves pp6 complexity (pp7 = samples per slice), with each slice requiring storage of two angles.

2. Extension to Visibility Bitmask Representation

The core innovation of the “visibility bitmask” is to encode occlusion not as two horizon angles per slice but as an pp8-bitmask pp9 per slice, with each bit representing the occlusion state (occluded/un-occluded) of a sector. The hemisphere elevation ω\omega0 is uniformly partitioned into ω\omega1 sectors, each mapped to bit indices ω\omega2. During the depth-marching, at each sample, both “front” (ω\omega3) and “back” (ω\omega4, with ω\omega5 a fixed thickness) points are projected. Their elevation angles ω\omega6 define an occlusion interval ω\omega7, which is mapped to sector indices ω\omega8:

ω\omega9

The corresponding bit pattern is formed by

Ω+\Omega^+0

and OR’ed into Ω+\Omega^+1. After processing, Ω+\Omega^+2 reflects which sectors in the slice are occluded by any “slab” of thickness Ω+\Omega^+3. This discretized encoding naturally supports multiple non-contiguous occluded intervals, in contrast to the original two-angle model (Therrien et al., 2023).

3. Ambient Occlusion Integral with Bitmask

Occlusion integration with the bitmask replaces analytic intervals by summing over sector midpoints:

Ω+\Omega^+4

with Ω+\Omega^+5 if occluded, Ω+\Omega^+6 if not. Full AO is assembled across slices:

Ω+\Omega^+7

If the original Ω+\Omega^+8 weighting is desired, precomputed per-sector weights Ω+\Omega^+9 may be used:

pp0

pp1

In most practical cases, uniform weighting suffices and incurs less computational overhead (Therrien et al., 2023).

4. Real-Time Implementation and Pseudocode

Each pixel maintains pp2-bit temporaries (for pp3), typically consuming 4–8 uint32 registers or shared-memory space. The GPU implementation per slice consists of:

  1. Sampling pp4 points along the slice from the depth buffer.
  2. For each, computing front/back angles, mapping to sector interval pp5, constructing the respective bitmask, and OR’ing into pp6.
  3. After all samples, computing pp7, a native single-GPU instruction, to count occluded sectors.
  4. Calculating AO as pp8.

For indirect-diffuse GI, each sample’s contribution is tested against the already-occluded mask with pp9 before accumulation, ensuring unique lighting per visible sector. Pseudocode in the source paper outlines this per-pixel, per-slice workflow, covering both AO and single-bounce GI (Therrien et al., 2023).

5. Quantitative Performance and Quality Metrics

Empirical results for a 1920×1080 RTX 2080 configuration are summarized in the tables below.

Radius Samples/half-slice GTAO AO (ms) Bitmask AO (ms)
0.8 8 0.49 0.51
1.0 12 0.75 0.77
1.0 16 0.95 0.97
2.0 16 1.12 1.13
3.0 16 1.12 1.13

The bitmask overhead at pp0 is approximately 0.01–0.02 ms (∼2%), rising to 5–10% for pp1.

Indirect-diffuse GI performance:

Config Rays (slices×steps) Resolution Sampling (ms) Denoise (ms) Total (ms)
(a) 4×(8 const) full 0.90 0.33 1.23
(b) 4×(8 const, r=4) full 1.70 0.33 2.03
(c) 4×(16 const, r=4) full 2.30 0.33 2.63
(f) 4×(16 exp, r=4) half 0.97 0.10 1.07

Comparative studies demonstrate reduced noise against SSR tracing at equal sample budgets (because each sample yields occlusion), fewer over-darkening “halos” around thin geometry, and AO visually close to ray-traced references—capable of capturing small-scale detail even at low sample counts. Multi-cone ambient occlusion improves the smoothness and directionality of shading over bent-normal approaches (Therrien et al., 2023).

6. Thin Geometry Handling and Multi-Cone Ambient Lighting

Traditional HBAO construes the depth buffer as a height field, failing on light passing behind thin, disconnected features. The bitmask mechanism models each sample as a ground “slab” of finite thickness pp2, permitting light leakage through gaps if any sector remains unoccluded after all sample slabs are OR’ed. This multi-interval encoding is efficient, enables the capture of complex visibilities, and mitigates overdarkening near thin surfaces without resorting to deep G-buffer or stochastic approaches (Therrien et al., 2023).

Moreover, the bitmask allows efficient sampling of ambient lighting in pp3 cones per slice. The pp4 azimuth is divided into pp5 segments; per subrange, the unoccluded bit fraction weights the ambient probe in that direction. This generalizes bent normal lighting (pp6) to multi-directional probes, enabling robust, directionally-aware ambient shading with negligible added cost, as per-popcount operations suffice (Therrien et al., 2023).

7. Summary and Significance

HBAO with visibility bitmask advances the state-of-the-art in real-time screen-space ambient occlusion and indirect illumination by discretizing the occlusion horizon into multiple sectors per view direction. It preserves pp7 sampling costs while supporting accurate modeling of thin geometry and multi-directional occlusions. The method’s generality extends to indirect diffuse and multi-cone ambient illumination, achieving visual results comparable to ray-tracing or multi-layer techniques but with the storage and performance footprint of classical HBAO (Therrien et al., 2023).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Horizon-Based Ambient Occlusion (HBAO).