Home
What is RayON?ΒΆ
RayON is an educational and experimental path tracer built in C++ with CUDA and OptiX acceleration. It started as a re-implementation of the classic Ray Tracing in One Weekend series and evolved into a fully interactive raytracer running at > 100 FPS @ 720p on an NVIDIA DGX Spark.
Two GPU rendering back-ends are available at runtime β no recompilation needed:
CUDA GPU
One-shot CUDA kernel with 32Γ4 thread blocks, warp-friendly memory layout, and persistent curand states.
CUDA Interactive
SDL2 window with progressive accumulation. Orbit, pan, zoom with the mouse. Dear ImGui sliders for live DOF, samples, light intensity, and roughness.
CPU renderers archived
The original CPU rendering backends (sequential and multi-threaded) have been moved to the legacy/cpu-renderer branch. The main branch now supports GPU rendering only.
It also features BVH Acceleration, CPU-built, with GPU-traversed Bounding Volume Hierarchy with Surface Area Heuristic (SAH) splitting. This provides 5β50Γ speedup on scenes with 100+ objects.
Sample rendersΒΆ
Quick startΒΆ
# Build (requires CMake β₯ 3.20, a C++17 compiler, and optionally CUDA + SDL2)
mkdir -p build && cd build
cmake .. --fresh
make -j$(nproc)
# Run β defaults to interactive mode when SDL2 is present, offline CUDA otherwise
./rayon
# Or pick an explicit renderer with -m:
./rayon -m 2 # CUDA one-shot
./rayon -m 3 # CUDA interactive (SDL2 required)
Load one of the bundled example scenes:
See Getting Started for the full setup guide, or YAML Scene Format to author your own scenes.
Explore the docsΒΆ
| Section | What you'll find |
|---|---|
| How It Works | The math: ray equations, material models, BVH, sampling theory |
| Architecture | Code organization, CUDA renderer internals, progressive pipeline |
| Features | Interactive controls, YAML scene format, SDF shapes, OBJ loading |
| Gallery | Curated renders from all available scenes |
| Performance | Benchmark results, speedup tables, tuning tips |