> 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/gtao-settings/gtao-denoising/spatial-denoising.md).

# Spatial Denoising

This page describes parameters under the "Spatial" foldout that are specific to GTAO mode.

## Filter Type

Defines the spatial filtering approach.

* **Box:** gathers samples from neighboring pixels. Provides stronger noise reduction and smoother results, but may over-blur details at grazing angles and at a distance.
* **Disk:** uses an anisotropic disk aligned with the surface normal, with radius adjusted by distance. Better preserves fine details, but can introduce some low-frequency noise.

## Pass Count <mark style="color:$info;">\[Box]</mark>

Controls the number of box passes. Each consecutive pass samples more distant pixels, so increasing this value makes the blur wider and stronger at the cost of performance.

*Performance impact: small*

{% tabs %}
{% tab title="Pass Count 1" %}

<figure><img src="https://243555089-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLiPpxgft87FiOXU8wYFQ%2Fuploads%2FZ4KXyAU6slmxieovr0rs%2FImage%20Sequence_074_0000.jpg?alt=media&amp;token=4af643d4-03ba-44a7-b85a-3c8747cf42c4" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Pass Count 3" %}

<figure><img src="https://243555089-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLiPpxgft87FiOXU8wYFQ%2Fuploads%2F5lGKR8Pp8MRFbuiPPqFL%2FImage%20Sequence_075_0000.jpg?alt=media&amp;token=be25c6b0-4413-4566-869d-064d2a6afa4b" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Filter Radius <mark style="color:$info;">\[Disk]</mark>

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.

{% hint style="warning" %}
Setting this parameter to **0** disables the spatial filter for the entire frame except for disocclusion areas, retaining the sharpness of temporal denoising on converged pixels while applying spatial denoising to non-accumulated areas - the best of both worlds.
{% endhint %}

*Performance impact: small*

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

<figure><img src="https://243555089-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLiPpxgft87FiOXU8wYFQ%2Fuploads%2FloGYPk8t4MNUMeVwIZkJ%2FImage%20Sequence_076_0000.jpg?alt=media&amp;token=f4b37007-6196-40dd-9eef-0481ecccc33e" alt=""><figcaption></figcaption></figure>
{% endtab %}

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

<figure><img src="https://243555089-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLiPpxgft87FiOXU8wYFQ%2Fuploads%2Fj0gInfXMhAjWqM4TqlYA%2FImage%20Sequence_077_0000.jpg?alt=media&amp;token=39471622-5690-42ca-9380-36b40cdd74ae" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Filter Adaptivity <mark style="color:$info;">\[Disk]</mark>

Adaptively shrinks the filter radius in crevices and other highly occluded areas to better preserve details from over-blurring. Use with care, high values may reduce the filter's effectiveness!

*Performance impact: none*

{% tabs %}
{% tab title="Filter Adaptivity 0" %}

<div data-full-width="false"><figure><img src="https://243555089-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLiPpxgft87FiOXU8wYFQ%2Fuploads%2FXN9myguRuqn21rwmu0zj%2FImage%20Sequence_078_0000.jpg?alt=media&amp;token=d61eed61-b03f-490a-93e4-1e5865be3859" alt=""><figcaption></figcaption></figure></div>
{% endtab %}

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

<figure><img src="https://243555089-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLiPpxgft87FiOXU8wYFQ%2Fuploads%2FWRG9zkfJb3CFqy2nnoyh%2FImage%20Sequence_079_0000.jpg?alt=media&amp;token=12df9ceb-d84c-44e0-ad73-a8957344930a" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Double Sample Count

Increases the number of spatial sample taps by a factor of 2, making the spatial filter twice as costly but twice as efficient.

*Performance impact: moderate*
