# Overview

<figure><img src="/files/LHd1HcqY96CB8xPcP5gC" alt=""><figcaption></figcaption></figure>

HTrace Ambient Occlusion combines three of the most popular ambient occlusion techniques into a single asset, offering a highly scalable and adaptive system for AO computation.

## Occlusion Modes

**RTAO** (Ray Traced Ambient Occlusion) — hardware-accelerated, ray traced ambient occlusion. Provides the most physically accurate and stable results compared to screen-space techniques.

* **Pros:** doesn't suffer from screen-space limitations, the most accurate of all three.
* **Cons:** requires ray-tracing capable hardware and API, heavily relies on denoising, has the highest performance cost of all three.

**GTAO** (Ground Truth Ambient Occlusion) — an advanced screen-space algorithm based on the latest GTAO research, augmented with [Visibility Bitmasks](/htrace-ao/settings-and-properties/gtao-settings/gtao-quality.md#visibility-bitmasks). Basically, it's as good as it gets in screen space.

* **Pros:** accurate, robust, captures both small details and large-scale occlusion well.
* **Cons:** usually requires denoising to gather enough samples, limited by its screen-space nature (no information about offscreen or occluded geometry).

**SSAO** (Screen Space Ambient Occlusion) — the fastest of the three modes, both in terms of raw performance and ease of setup. Heavily inspired by the [Mini Engine AO](https://github.com/Microsoft/DirectX-Graphics-Samples).

* **Pros:** the fastest ambient occlusion, doesn't require denoising or motion vectors, zero temporal lag.
* **Cons:** doesn't capture small details well, is very approximate, and not physically correct. Same screen-space limitations as GTAO.

{% tabs %}
{% tab title="RTAO" %}

<figure><img src="/files/jynXiG6hpPibmVKwVvln" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="GTAO" %}

<figure><img src="/files/XSjyPCcEn2NCsLwTXltB" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="SSAO" %}

<figure><img src="/files/gkLbekUjyVCURP4Htem9" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## **Main Features**

* **Full Integration into the Rendering Pipeline:** HTrace AO doesn't simply overlay its result on top of the image - it fully replaces the native ambient occlusion effect. The integration happens automatically and doesn't require package customization or manual setup. As a result, it correctly interacts with the rest of the lighting and other effects, and works with both Deferred and Forward rendering.
* **Scalability:** the asset offers [three different AO modes](#occlusion-modes), ranging from extremely fast SSAO to highly accurate RTAO, each with its own strength. Choose the one that best suits your performance target or hardware requirements. HTrace AO exposes many parameters for fine-tuning each mode through a clear, user-friendly UI.
* **Cutting-Edge Screen Tracing:** not just a standard GTAO - we carefully gathered all meaningful improvements and optimizations of the technique that emerged over the years since it was first released. It encompasses both big innovations like [Visibility Bitmasks](/htrace-ao/settings-and-properties/gtao-settings/gtao-quality.md#tracing-mode) as well as a bunch of smaller enhancements to deliver the highest quality screen-space AO currently possible.
* **Real-Time Ray-Tracing:** RTAO mode is packed with all the tools we could come up with to make Ray-Traced AO a practical choice: fast [Inline Ray-Tracing](/htrace-ao/comparisons-with-unitys-ao/htrace-rtao-vs.-hdrp-rtao.md#inline-ray-tracing), [RTAS culling](/htrace-ao/settings-and-properties/rtao-settings/rtao-culling.md) and [debugging](/htrace-ao/settings-and-properties/shared-settings.md#debug-mode), [Screen-Space Pretracing](/htrace-ao/settings-and-properties/rtao-settings/rtao-quality.md#screen-space-pretrace) to cover any mismatch with the rasterized scene, [Contact Occlusion](/htrace-ao/settings-and-properties/rtao-settings/rtao-denoising/spatial-denoising.md#contact-occlusion) for an additional layer of detail, and many more. This mode is built to provide the highest accuracy, without sacrificing performance and usability.
* **Advanced Denoising:** high-end denoising pipeline tailored to each AO mode and built upon our extensive experience and research in this area. Includes 2.5D motion vectors, [tracking of moving occlusion](/htrace-ao/comparisons-with-unitys-ao/htrace-rtao-vs.-hdrp-rtao.md#temporal-rejection), [sharp reprojection](/htrace-ao/settings-and-properties/gtao-settings/gtao-denoising/temporal-denoising.md#reprojection-filter), [anisotropic spatial filtering](/htrace-ao/settings-and-properties/gtao-settings/gtao-denoising/spatial-denoising.md#filter-type) and other state-of-the-art denoising techniques. Comes with configurable temporal and spatial stages helping you find the right balance of noise reduction and temporal responsiveness for your project.
* **Resolution Scaling:** HTrace AO offers [Full, Half and Quarter](/htrace-ao/settings-and-properties/gtao-settings/gtao-quality.md#resolution) resolution modes, accompanied by a sharp and optimized upscaler. Designed to reduce the overall effect cost by a factor of 2 or even 4, making them a useful tool to balance quality and performance. RTAO also features a special [Adaptive resolution](/htrace-ao/settings-and-properties/rtao-settings/rtao-quality.md#resolution) mode: conceptually similar to VRS, it renders areas of the screen with high geometric complexity at full rate and reduces resolution for uniform pixels, automatically adapting to the content.
* **Extensive Rendering Control:** you can [exclude objects](/htrace-ao/settings-and-properties/shared-settings/visuals.md#exclude-receiving) from casting and/or receiving AO via render layer masks, choose the source of the normals (either from a native buffer or [reconstructing](/htrace-ao/settings-and-properties/shared-settings/pipeline-integration.md#reconstruct-normals-urp) them from depth on demand), decide at which point in the pipeline to render AO by selecting an [injection point](/htrace-ao/settings-and-properties/shared-settings/pipeline-integration.md#injection-point-urp), or even output the result to ShaderGraph for custom material effects. The asset also provides convenient [debugging overlays](/htrace-ao/settings-and-properties/shared-settings.md#debug-mode), so you can visually inspect the state of all buffers used by HTrace AO.

## Requirements and Limitations

* **Exclude Casting / Receiving** masking options require **Unity 6000.0** or newer.
* **Non Render Graph** path in **URP** is supported only for **Unity 2022**.
* **Unity** **LTS** releases are recommended; bug fixes for **non-LTS** versions are not guaranteed.
* **RTAO** mode requires **Unity 6000 or above**, a compatible [API and hardware](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/raytracing-requirements.html?ampDeviceId=19b2d8b6-fe5c-4507-af7c-6eaa4d92938b\&ampSessionId=1774544928333\&ampTimestamp=1774631400291).
* **Orthographic Camera** is untested and not guaranteed to work correctly.
* **MSAA** is untested and not guaranteed to work correctly.

## Compatibility <a href="#compatibility" id="compatibility"></a>

* **Currently tested APIs are:** DX11, DX12 and Metal (doesn't support **RTAO** mode).
* **Currently tested HDRP / URP versions are:** 14 and above.
* **Currently tested Unity versions are:** from 2022.2 to 6000.4.

{% embed url="<https://www.patreon.com/c/htrace>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ipgames.gitbook.io/htrace-ao/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
