a naive path tracer.
See gallery
for scene credits.
mkdir build
cd build
cmake ..
make -j
./toyray
- triangle
- triangle mesh
- sphere
- infinite plane
- square
- cube
- transformed geometries
- alpha-masked geometries
- bump-mapped geometries
- lambert reflective
- lambert transmissive
- mirror
- conductor (smooth / rough)
- dielectric (smooth)
- plastic (smooth / rough)
- diffuse area light
- point light
- directional light
- constant environment light
- environment map (light probe)
- std::mt19937
- shapes: Wavefront OBJ (ASCII)
- scene configuration: Tungsten styled JSON
- light probe / texture: EXR, HDR, PNG, JPG
- EXR
- BMP
This renderer is neither reliable or efficient. If you are looking for open-source renderers, check out Mitsuba, PBRT, Tungsten...
If you decide to learn path tracing by reading this code, I recommend start by looking at the path tracing core src/renderer.cpp
.
Scenes are available at toyray-scenes made by other artists, mostly converted by Benedikt Bitterli.