> 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

## 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="/files/nPy8hJBbuBFvJXohW4OE" alt=""><figcaption></figcaption></figure>
{% endtab %}

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

<figure><img src="/files/jYHfrSOZshraAitXO8nC" 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="/files/DBwvCCYoqyapJqnqfPSk" alt=""><figcaption></figcaption></figure>
{% endtab %}

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

<figure><img src="/files/JUWjLiceNDttB9TeIM4g" 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="/files/q7tAIoiVLG4M8TqLyjjx" alt=""><figcaption></figcaption></figure></div>
{% endtab %}

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

<figure><img src="/files/Nh9yhtO9qR6e7LWWEPfJ" 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*
