Obsidian

Whitted Raytracer written in Rust using the Vulkan compute API

Look at the source.

image3

This is a project I worked on to learn more about raytracing techniques, Rust, and Vulkan.

Some notes

Disclaimer: The below notes are several years old and are likely (definitely) out of date.

This raytracer only renders spheres, as I’ve only implemented the ray-sphere intersection. Some potential future features could be ray-triangle intersections and handling refraction. However due to the immaturity of Rust and the available Vulkan bindings, it was pretty difficult to actually use Vulkan’s compute API. For this reason, if I were to implement a more fully-featured whitted raytracer, I’d likely just use C++ for the more established ecosystem of libraries and tools. Rust is a great programming language, but it still seems to be a little rough around the edges in certain niche areas.

Reflections

image

Materials

image2