Welcome to RTX, a work-in-progress ray tracing engine built using Vulkan.
The engine leverages the NVIDIA's VK_NV_ray_tracing extension, which was the only available option when I started working on this. Consecuently, an NVIDIA RTX GPU is currently required to utilize the ray tracing pipeline. I plan to migrate the code to the cross-platform VK_KHR_ray_tracing_pipeline extension, now that I have a Steam Deck.
For those without an NVIDIA RTX GPU, the engine will gracefully fallback to a minimal rasterizer pipeline.
- Utilizes the tinyobjloader library to load textured Wavefront OBJ models, only one model can be loaded.
- Provides a simple UI with settings and stats using Dear ImGui.
- A timing heat map of the time spent to draw each pixel.
- Light reflection on metal and lambertian materials.
- A single source of light. It's position and intensity can be adjusted in the UI.
- Mouse support. Models can be rotated and the mouse wheel lets you zoom in or out.
- Move around the scene using the WASD keys.
RTX can be built and executed on Linux, macOS, and Windows (with Git Bash and MSYS2). Ensure you have VulkanSDK 1.3 installed, although it should also work with Vulkan 1.2 after making a few modifications.
- On Ubuntu, refer to the
Dockerfile
or follow this steps:- Install the VulkanSDK Ubuntu package.
- Install the following packages:
clang cmake curl git libgl-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev ninja-build
.
- On Arch Linux, install the following packages:
clang cmake curl git libglvnd libx11 libxcursor libxi libxinerama libxrandr ninja vulkan-devel
.
- Install the VulkanSDK Installer.
- Install Hombrew and the required packages using the following command:
brew install cmake git ninja
To build and run RTX, follow these steps:
- Clone the repo and its submodules:
git clone --recursive https://github.com/Teledhil/rtx.git
- Build with:
./build.sh
- Launch the render with:
./_build/bin/rtx
- The Ray Tracing in One Weekend books
- Vulkan Tutorial
- Sascha Willems's Vulkan C++ examples and demos
- NVIDIA Vulkan Ray Tracing Tutorials
- GPSnoopy's RayTracingInVulkan