HTrace RTAO vs. HDRP RTAO
Both algorithms share the same ray-tracing implementation, which, due to its nature, can theoretically converge to the same result (ground truth). HTrace RTAO, however, makes its primary goal to achieve this result faster with minimal visual compromises, denoise it better, and provide useful scalability features along the way.
WARNING
The following comparison is performed in the HDRP Demo Scene on a laptop RTX 3060 6GB, 1920 x 1080 native.
Equal time, better result
This first test demonstrates how HTrace AO achieves better visual results with roughly equal timings. The main visual difference comes from a more advanced spatial denoising algorithm used by HTrace. The performance impact is, of course, quite high for an ambient occlusion effect, so we can start scaling down from here.


.png)
.png)
Inline Ray Tracing
HTrace provides 2 forms of hardware-accelerated ray-tracing. The first we call "Native", because this is the type of ray-tracing used by HDRP itself, and the second is called Inline. The latter can be viewed as a more flexible form of ray-tracing, but with certain drawbacks: for instance, it doesn't know much about material properties in the scene. Luckily, ambient occlusion (unlike, say, global illumination) requires only one material property: alpha cutout. At the same time, true alpha-cutout evaluation is notorious for slowing down ray traversal.
Therefore, we can turn this drawback into an advantage by using Inline Ray Tracing without evaluating alpha cutout during traversal, handling it instead in screen space against the existing depth buffer (falling back to a fully opaque geometry representation outside the frame). This reduces ray-tracing timings dramatically when alpha-cutout geometry is in view, with minimal visual bias.


Resolution Scaling
We can also speed up AO rendering by lowering the resolution of the effect (which is not possible with HDRP's native RTAO). We even have a specially designed mode for our RTAO called Adaptive Resolution, which is similar to VRS rendering and traces at different resolutions for different areas of the frame, depending on geometric complexity.


To scale down further, we can use Quarter Resolution (formerly known as Half in V1), which increases performance by almost 2x.


By using HTrace RTAO with Inline Ray Tracing combined with Adaptive or Quarter Resolution, we managed to reduce the performance cost from 8.5 ms to 2.8 / 1.5 ms without decreasing the Ray Count, which was set to 4 rays per pixel for this test and could be tweaked further for even better performance if needed.
Spatial Denoiser and Contact Occlusion
With a growing filter radius, HDRP RTAO yields progressively blurrier results, with many occlusion details destroyed by such aggressive denoising. Moreover, individual spatial samples become visible, forming distinctive lines and contours around geometric features. HTrace RTAO provides much smoother results that preserve detailed occlusion. Furthermore, it's equipped with the Contact Occlusion feature, which adds another layer of small-scale occlusion that brings out even the smallest geometry details.
.jpg)


Screen Space Pretrace
HTrace RTAO can combine ray-traced results with screen-space ray marching, which can be especially useful when an object is visible to the main camera (rasterized) but cannot be added to the Ray Tracing Acceleration Structure for any reason, making it invisible to hardware ray tracing. Occlusion from such a missing object can be regained via the Screen Space Pretrace feature. HDRP RTAO doesn't offer such an approach, providing a hard split between screen-space and ray-traced ambient occlusion paths.
Temporal Rejection
HDRP RTAO provides binary rejection options: Occluder Motion Rejection and Receiver Motion Rejection, which are simple checkboxes - either on or off. When enabled, HDRP completely discards temporal accumulation for AO cast from moving objects onto static ones (e.g. occlusion from a statue cast onto the floor) and onto themselves (e.g. the surface of a statue). This is why in this example we see essentially no temporal denoising on the moving statues or the occlusion they cast, leading to excessive and unnecessary noise.
HTrace RTAO, on the other hand, tracks the speed of moving objects and the direction of their movement, and is able to reject temporal history adaptively. In this example, it strongly rejects only the occlusion cast by a fast-moving statue onto the floor beneath it. The occlusion of the slowly moving statue, as well as the occlusion the statues cast onto themselves, is rejected less aggressively or not at all, because in these cases the delta between the caster and the receiver is considered small enough. This rejection behaviour can be further fine-tuned through the UI.
WARNING
Spatial denoising is reduced to a minimum in both cases here, to better demonstrate the temporal accumulation process.
Overall, HTrace RTAO uses a very advanced temporal denoising pipeline that utilizes 2.5D motion vectors, a sharp Bicubic Reprojection Filter, and allows you to explicitly set the maximum number of accumulated frames.
Additional Features
Here is the list of most notable features HTrace RTAO offers that are not present in HDRP's RTAO implementation:
- Fadeout
- Exclude Receiving
- Adaptive | Half | Quarter Resolution
- Inline Ray Tracing
- Sample Rebalancing
- Screen Space Pretrace
- Double Pass Denoising
- Output Dithering
- Sharp Temporal Reprojection
- Explicit Temporal Samplecount Control
- Static | Dynamic rejection with Velocity and Direction tracking
- Disocclusion Boost
- Contact Occlusion