实时 Direct3D 12 路径追踪器
A hobby real-time Direct3D 12 path tracer. Mainly developed for learning and experimenting with the latest research in real-time rendering.
To achieve real-time frame rates, this renderer utilizes recent developments such as hardware-accelerated ray tracing (DXR), advanced sampling (ReSTIR), and smart upscaling (AMD FSR2).
Graphics APIs such as Vulkan and Direct3D 12 require resource barriers to be placed manually by the programmer. These barriers control synchronization, memory visibility, and additionally for textures, resource layout. As program complexity grows, manual placement can lead to issues such as:
Furthermore, using multiple command buffers requires a correct submission order—e.g., command list A writes to a resource that is read by command list B, so A has to be submitted before B.
A render graph can help with all of the above; by analyzing resource dependencies, a directed acyclic graph (DAG) is formed from which submission order is derived and barriers are automatically placed. A visualization is shown below.
The main sample application (Source/ZetaLab) provides a light editor experience with the following features:
Standard CMake. In the project directory, run:
> mkdir build
> cd build
> cmake ..Before running the project, glTF scenes need to be preprocessed first by generating mipmaps and converting textures to DDS format. A command-line utility app (Tools/BCnCompressglTF) is provided for this purpose. It can be used as follows:
> cd bin
> BCnCompressglTF The outputs are:
_zeta suffix (e.g., myscene.gltf -> myscene_zeta.gltf) /compressed directory.For convenience, a preprocessed Cornell Box scene is provided (Assets/CornellBox/cornell.gltf). After building the project, you can run it as follows:
> cd bin
> ZetaLab ../Assets/CornellBox/cornell.gltfCurrently, Unicode paths are not supported. Support is planned for a future release.
[1] Y. Ouyang, S. Liu, M. Kettunen, M. Pharr and J. Pantaleoni, "ReSTIR GI: Path Resampling for Real-Time Path Tracing," Computer Graphics Forum, 2021.
[2] S. Hillaire, "A Scalable and Production Ready Sky and Atmosphere Rendering Technique," Computer Graphics Forum, 2020.
[3] MinimalAtmosphere, https://github.com/Fewes/MinimalAtmosphere
[4] B. Bitterli, C. Wyman, M. Pharr, P. Shirley, A. Lefohn and W. Jarosz, "Spatiotemporal reservoir resampling for real-time ray tracing with dynamic direct lighting," ACM Transactions on Graphics, 2020.
[5] J. Boksansky, P. Jukarainen, and C. Wyman, "Rendering Many Lights With Grid-Based Reservoirs," in Ray Tracing Gems 2, 2021.
[6] D. Lin, M. Kettunen, B. Bitterli, J. Pantaleoni, C. Yuksel and C. Wyman, "Generalized Resampled Importance Sampling: Foundations of ReSTIR," ACM Transactions on Graphics, 2022.
[7] OpenPBR Surface, https://github.com/AcademySoftwareFoundation/OpenPBR
MIT License—see LICENSE for more details.
暂无开放 Issues,或尚未同步最近议题。