/paraflop

A simple raytracer implementing basic ReSTIR

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Paraflop

This project implements NVIDIA's restir (± GI). Also, it uses the VK_KHR_ray_tracing extension, so make sure vulkan has support for your hardware.

This project contains chunks of code from the vulkan tutorial and Sacha Willems' vulkan samples. A big thanks to the people who created those wondrous resources.

Also, very importantly, the vulkan specs

Mind you this is an educational project. The author does not guarantee that the code works, and you should double check any chunks of code you copy from here.

The name was generated by this word does not exist.

Building

The shaders (the folder containing compiled shader) and assets (the one from external/assets) folders have to be in the same directory as the executable

Editing the shader code

Should you want to edit the shaders, you'll have to compile them with

glslc --target-spv=spv1.4 <shader_name> -o <output_name>

And then you'll have to move the resulting shader binary into the shaders folder.

Dependencies

You need Vulkan, GLM, GLFW, and the LunarG SDK. Here's the commands to instal them on some systems.

Ubuntu

sudo apt install vulkan-tools \
libvulkan-dev \
vulkan-validationlayers-dev \
spirv-tools \
libglfw3-dev \
libglm-dev \
libxxf86vm-dev \
libxi-dev

Fedora

sudo dnf install vulkan-tools \
vulkan-loader-devel \
mesa-vulkan-devel \
vulkan-validation-layers-devel \
glfw-devel \
glm-devel \
libXi-devel \
libXxf86vm-devel

Arch

Use glfw-x11 is you are not on wayland

sudo pacman -Syu vulkan-devel \
glfw-wayland \
glm \
libxi \
libxxf86vm

Compiling

I mean, it's a CMake project. I'll still leave the commands here, just in case you're lazy.

git clone --recursive https://github.com/pmozil/paraflop
cd paraflop

git submodule init
git submodule update
mkdir build
cd build
cmake ..
cmake --build ..

Now, to run this just do

./paraflop