> 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/settings-and-properties/rtao-settings/rtao-denoising/spatial-denoising.md).

# Spatial Denoising

## Filter Radius&#x20;

Defines the radius of the anisotropic filtering disk. The higher the radius, the stronger the noise reduction, however, beyond a certain value, halo-like artifacts may appear around objects. It is recommended to use the lowest value that provides sufficient noise reduction.

*Performance impact: small*

{% tabs %}
{% tab title="Filter Radius 0.1" %}

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

{% tab title="Filter Radius 1" %}

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

## Contact Occlusion

Adds an additional pass of screen-space occlusion with a very short fixed radius. It runs at a later denoising stage (or even after denoising) and is meant to restore small details lost during spatial filtering, adding another layer of depth to the occlusion. The result of this pass is multiplied with the rest of the occlusion, creating further darkening in corners and at surface intersections. This parameter controls the overall intensity of contact occlusion. Setting it to **0** disables the effect entirely, saving performance.

*Performance impact: moderate*

{% tabs %}
{% tab title="Contact Occlusion 0" %}

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

{% tab title="Contact Occlusion 1" %}

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

## Denoise <mark style="color:$info;">\[Contact Occlusion]</mark>

Activates denoising of the [Contact Occlusion](#contact-occlusion) effect. When enabled, Contact Occlusion is rendered before the second denoising pass and denoised together with the rest of the data during that pass. When disabled, Contact Occlusion is executed at the very end of the pipeline, providing maximum responsiveness at the cost of increased noise. This option is only shown when [Resolution](/htrace-ao/settings-and-properties/rtao-settings/rtao-quality.md#resolution) is set to **Full** and [Denoising Mode](/htrace-ao/settings-and-properties/rtao-settings/rtao-denoising.md#denoising-mode) is set to **Double Pass**.

{% hint style="warning" %}
If HTrace AO detects any form of temporal anti-aliasing or upscaling (e.g. TAA, STP, or DLSS) it automatically animates the Contact Occlusion noise pattern so it can be denoised by those temporal algorithms. This approach can be used as an alternative to enabling the **Denoise** option.
{% endhint %}

*Performance impact: none*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/settings-and-properties/rtao-settings/rtao-denoising/spatial-denoising.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.
