Spectra is a cross-platform ray tracer written in C++ using libraries such as glm for vector math, Dear ImGui for the GUI and stb_image for exporting the result to a .png file.
This is the most recent image rendered. It shows 32 spheres with randomly generated colors and materials, a ground plane and a mirror plane.
- Cross-platform
- A Graphical User Interface
- Stochastic Multi-Sampling anti-aliasing
- Materials
- Perspective & Orthographic camera
I've been interested in raytracing for some time, so I decided to try to write one myself.
- "An Introduction to Ray Tracing" by Andrew S. Glassner
- scratchapixel.com
- pbrt-v3
- Ray Tracing in One Weekend
- The Cherno's Ray Tracing
To build Spectra you need CMake 3.2+ and a C++ Compiler such as g++ or MSVC. Also make sure to clone recursively.
mkdir build
cmake -S src -B build
cmake --build build
cd build/Release # This is important. Spectra cannot load the font if it isn't launched from this directory
./Spectra
