CrossRT: A cross platform programming technology for hardware-accelerated ray tracing in CG and CV applications
We propose a programming technology that bridges cross-platform compatibility and hardware acceleration in ray tracing applications. Our methodology enables developers to define algorithms while our translator manages implementation specifics for different hardware or APIs. Features include: generating hardware-accelerated code from hardware-agnostic, object-oriented C++ algorithm descriptions; enabling users to define software fallbacks for non-hardware-accelerated CPUs and GPUs; producing GPU programming API-based algorithm implementations resembling manually ported C++ versions. The generated code is editable and readable, allowing for additional hardware acceleration. Our translator supports single megakernel and multiple kernel path tracing implementations without altering the programming model or input source code. Wavefront mode is crucial for NeRF and SDF, ensuring efficient evaluation with multiple kernels. Validation on tasks such as BVH tree build/traversal, ray-surface intersection for SDF, ray-volume intersection for 3D Gaussian Splatting, and complex Path Tracing models showed comparable performance levels to expert-written implementations for GPUs. Our technology outperformed existing Path Tracing implementations.
我们提出了一种编程技术,在光线追踪应用中实现跨平台兼容性与硬件加速的桥梁。我们的方法允许开发者定义算法,而我们的翻译器负责为不同的硬件或API管理具体实现。其特点包括:从与硬件无关的面向对象C++算法描述生成硬件加速代码;允许用户为非硬件加速的CPU和GPU定义软件备选方案;生成基于GPU编程API的算法实现,其表现类似于手动移植的C++版本。生成的代码是可编辑和可读的,支持进一步的硬件加速。我们的翻译器支持单一大核和多核路径追踪实现,而无需更改编程模型或输入源代码。Wavefront模式对于NeRF和SDF至关重要,确保使用多核进行高效评估。在诸如BVH树构建/遍历、SDF的光线-表面相交、3D高斯散点的光线-体积相交、以及复杂的路径追踪模型等任务上的验证表明,其性能与专家编写的GPU实现相当。我们的技术在性能上超越了现有的路径追踪实现。