> For the complete documentation index, see [llms.txt](https://ipgames.gitbook.io/htrace-ao/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ipgames.gitbook.io/htrace-ao/v1/overview.md).

# Overview

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

## Occlusion Modes

**RTAO** (Ray Traced Ambient Occlusion) - hardware accelerated, real-time ray traced ambient occlusion. Provides the most physically accurate results.

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

**GTAO** (Ground Truth Ambient Occlusion) - the cutting-edge screen-space algorithm based on [XeGTAO](https://github.com/GameTechDev/XeGTAO) and augmented by the most recent research on [Visibility Bitmasks](/htrace-ao/v1/settings-and-properties/quality/gtao-quality-settings.md#visibility-bitmasks).

* **Pros:** very accurate, captures small details well, basically it's as good as it gets in screen-space.
* **Cons:** may require denoising to gather enough samples, though it can work without it.

**SSAO** (Screen Space Ambient Occlusion) - the fastest of the three modes, both in terms of performance and responsiveness, and the easiest to set up. 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, very approximate, not physically correct.

{% 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 %}

| Feature                                                       | RTAO     | GTAO                                                                                                                     | SSAO         |
| ------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ | ------------ |
| **Motion Vectors**                                            | Required | Required if [temporal denoiser](/htrace-ao/v1/settings-and-properties/denoising/temporal-denoiser-settings.md) is active | Not Required |
| **Normal Buffer**                                             | Required | Required                                                                                                                 | Not Required |
| **Temporal Denoiser**                                         | Required | Optional                                                                                                                 | Not Required |
| <p><strong>Spatial</strong> <br><strong>Denoiser</strong></p> | Required | Optional                                                                                                                 | Not Required |

## Pipeline Differences

* **Integration** - describes the level of HTrace integration into the given rendering pipeline. **Full** means a complete replacement of the native AO and, as a result, full compatibility with all other rendering effects. **Partial** means a more traditional, post-processing approach, where the final buffer is overlayed on top of the frame at a certain injection point.
* **RTAO Alpha Cutout** **Mode** - describes the way ray tracing treats alpha cutout materials. Refer to [this section](/htrace-ao/v1/settings-and-properties/quality/rtao-quality-settings.md#alpha-cutout-hdrp-only) for additional information. &#x20;
* **RTAO Motion Rejection** -  the ability of RTAO's denoiser to detect pixels whose rays hit moving objects and [reject temporal history](/htrace-ao/v1/settings-and-properties/denoising/temporal-denoiser-settings.md#motion-rejection) accordingly.&#x20;
* **RTAO Specular Occlusion** - the ability of a rendering pipeline to use ambient occlusion results to construct [specular occlusion](/htrace-ao/v1/settings-and-properties/visuals-settings.md#specular-occlusion-rtao-hdrp).
* **VR Support** - whether the single pass VR rendering is supported or not.
* **Dir. Light Occlusion** - indicates the availability of [directional light occlusion](/htrace-ao/v1/settings-and-properties/visuals-settings.md#direct-lighting-occlusion-hdrp-urp) control. **No** - means no control (occlusion will always be overlayed across directional lighting).

| Feature                         | HDRP                 | URP            | BIRP           |
| ------------------------------- | -------------------- | -------------- | -------------- |
| **Integration**                 | Full                 | Full           | Partial        |
| **RTAO Support**                | Unity 2023.2 +       | Unity 2023.2 + | Unity 2023.2 + |
| **RTAO Alpha Cutout Mode**      | Depth Test, Evaluate | Depth Test     | Depth Test     |
| **RTAO Motion Rejection**       | Yes                  | Yes            | No             |
| **RTAO Specular Occlusion**     | Yes                  | No             | No             |
| **Directional Light Occlusion** | Yes                  | Yes            | No             |
| **VR Support**                  | Yes                  | No             | No             |

## Other Differences and Requirements

* RTAO mode requires ray-tracing compatible API (e.g. DX12) and hardware. For more information, please, refer to this [page](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/raytracing-requirements.html). This is relevant for all 3 rendering pipelines.
* RTAO in URP and BiRP as well the [**Evaluate**](/htrace-ao/v1/settings-and-properties/quality/rtao-quality-settings.md#alpha-cutout-hdrp-only) alpha cutout option in HDRP utilize [Inline Ray Tracing](https://discussions.unity.com/t/inline-ray-tracing-support-in-2023-2/925289) and require Unity 2023.2 as the minimum version.
* To use the [**Checkerboarding**](/htrace-ao/v1/settings-and-properties/quality/rtao-quality-settings.md#checkerboarding) option alongside the [**Evaluate**](/htrace-ao/v1/settings-and-properties/quality/rtao-quality-settings.md#alpha-cutout-hdrp-only) alpha cutout option in HDRP, Unity 2023.3 or higher is required due to the [DispatchIndirect](https://discussions.unity.com/t/is-there-a-dispatchraysindirect/900583/2) function being utilized for this.
* In URP HTrace requires [Depth Priming Mode](https://docs.unity3d.com/6000.0/Documentation/Manual/urp/urp-universal-renderer.html#:~:text=%C2%A0%C2%A0Depth%C2%A0Priming%C2%A0Mode) to be enabled if used with Forward rendering.

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