GPRT is a ray tracing API that wraps the Vulkan ray tracing interface.
The repository is organized into several key directories:
gprt/
– the core library. Host APIs are implemented ingprt_host.h
/gprt.cpp
while device-side shaders live ingprt.slang
. Math helpers are undergprt/math/
.samples/
– tutorial-style examples showing how to build ray tracing applications with GPRT.tests/
– host-side tests for buffers and acceleration structures.docs/
– Sphinx documentation sources.3rdParty/
– external dependencies pulled in as submodules.
GPRT uses CMake to compile the host code and the Slang/HLSL toolchain
for device shaders. After buffers and programs are set up, the shader
binding table is built with gprtBuildShaderBindingTable
before
launching work on the GPU.
- CMake
- C++17
- Vulkan SDK (>= 1.4.309.0)
GPRT's documentation can be found here.
This repository contains submodules for external dependencies, so when doing a fresh clone you need to clone recursively:
git clone --recursive [email protected]:gprt-org/GPRT.git
Existing repositories can be updated manually:
git submodule init
git submodule update
Install the Vulkan SDK for your platform (version 1.4.309.0 or greater).
GPRT uses CMake for configuration. For an empty directory, build
, in the top
directory of this repository, the project can be configured with
cmake ..
and built with
cmake --build .
The following apt-packages should be installed:
sudo apt install xorg-dev libxinerama-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglfw3
along with the Vulkan SDK.
Note: if using Ubuntu 22 with Wayland (or other distros for that matter), the above x11 dev packages still work via xwayland.
The documentation lists every host
and device API call. The samples are arranged as a progression of small
programs starting from samples/s0-rayGenPrograms
; reading them is the
best way to become familiar with the API. The tests under tests/
provide additional usage examples for buffer and acceleration structure
operations.