HTrace GTAO vs. HDRP GTAO
Last updated
Last updated
HDRP's screen space ambient occlusion features a GTAO (Ground Truth Ambient Occlusion) algorithm similar to the one used by HTrace. However, it's based on the original implementation rather than the more recent versions.
For the following 2 screenshots, both algorithms were tuned to match in samplecount and performance:
HDRP's GTAO uses 1 slice x 2 directions x 32 steps = 64 samples in total, ~ 1.75 ms. HTrace's GTAO uses 2 slices x 2 directions x 16 steps = 64 samples in total, ~ 1.75 ms.
HDRP's GTAO doesn't scale well in terms of the quality of tracing and denoising. As a result, even when performance or resolution are not limiting factors and higher quality is desired, it's not always possible to achieve with HDRP's occlusion. HTrace offers higher scalability, providing much better visual results.
HDRP is set to the "High" preset here, and HTrace uses its medium to high settings.
As with most screen-space algorithms, GTAO is not aware of object thickness and treats the depth buffer as infinitely thick by default. Therefore, different thickness heuristics have been proposed to overcome the issue of thin objects' overocclusion. More about this problem can be read here. One of the most influential contributions to this field was recently made by visibility bitmasks research,, which allowed horizon-based algorithms (such as HBAO and GTAO) to evaluate visibility with much better accuracy, significantly bridging the gap with RTAO.
Unfortunately, HDRP's GTAO hasn't been augmented with any thickness heuristic, as can be observed in the GTAO.compute file at line 53, which still has a TODO note about adding it. This results in very poor evaluation of thin objects (e.g., fences, bars), which degrades even further as the effect's radius grows.
In the following screenshots, pay attention to small details: round curtains, alpha cutout vegetation, and normal maps. As you can see, HDRP's GTAO details take a particularly hard hit as its radius increases. Indeed, the official documentation admits that "Be aware that a higher distance (radius) value often produces a lower quality result." HTrace's GTAO is much less susceptible to this issue and retains small details even with a large radius.
HTrace features an advanced upscaler, including an adaptive Lanczos filter inspired by FSR 1.0 and improved with bilateral weights. This makes it more viable to render the effect in half resolution and then upscale it, retaining as much detail as possible.