Incorporating XeGTAO in Hazel Engine

The integration of Intel's XeGTAO into the Hazel engine marked a significant milestone in the project. At the time of integration, Hazel did not have support for HLSL shaders. Recognizing the superiority (in my opinion) and flexibility of HLSL over the engine's main, GLSL. At the time, Cherno had opened my eyes on such an idea. So I took the initiative to implement the support for it. This was a significant undertaking that required a deep understanding of both the Hazel engine and the Vulkan API which I lacked at the time. Now, even though Hazel only supports Vulkan, the shaders are mostly written in HLSL. This has greatly improved the flexibility of the engine where it's much easier to integrate more stuff in it. Furthermore, the integration of XeGTAO was facilitated by the prior implementation of Screen Space Reflections (SSR), as both require a Hierarchical Depth Buffer. Thus, the path was paved for XeGTAO, making its integration much smoother and more efficient.

Technical Overview

XeGTAO, also known as Ground Truth Ambient Occlusion, is a state-of-the-art screen space algorithm. It was given to me by Cherno, and its name alone was enough to pique my interest. What sets XeGTAO apart is its basis on the Monte Carlo algorithm, which makes it particularly effective when denoised properly since ambient occlusion is also a low-frequency signal. This feature is what makes XeGTAO one of the best in its class. You can learn more about XeGTAO and its implementation from the official repository .

Results and Impact

The results of incorporating XeGTAO were nothing short of impressive. When compared to NVIDIA's old HBAO, which I had incorporated in my early work with Hazel, XeGTAO outperformed it by a significant margin, with almost a little performance decrease. The difference was like night and day, with XeGTAO providing a level of realism and flexibility that was simply unmatched by HBAO.

Future Work

Temporal Anti-Aliasing (TAA) works well with XeGTAO, and it's an area where performance can be improved without sacrificing too much quality. I also plan to implement Ray Tracing Ambient Occlusion (RTAO), and perhaps even a hybrid of both RTAO and XeGTAO. These enhancements will continue to push the boundaries of what's possible with the Hazel engine.

Conclusion

In conclusion, the integration of XeGTAO into the Hazel engine has been a resounding success. It has not only improved the realism and flexibility of the engine but has also paved the way for future enhancements. The experience and knowledge gained from this project have been invaluable and will undoubtedly be beneficial in my future endeavors. As I continue to explore and implement new features, I am excited about the potential of the Hazel engine and look forward to seeing where this journey takes me.

Images

Here are some images that demonstrate the results of XeGTAO.
Click on an image to view it in bigger size.