A spectral path tracer with Metal GPU acceleration.
- Metal compute shaders for GPU-accelerated ray tracing on macOS
- Spectral rendering — samples random wavelengths per ray (380–780nm) with proper wavelength-to-RGB conversion
- Cauchy dispersion — wavelength-dependent refractive index (
n = A + B/λ²) produces chromatic aberration and rainbow caustics - BVH acceleration — bounding volume hierarchy for sphere intersection
- Adaptive sampling — early termination when pixel luminance converges
- Camera lens simulation — spherical lens with depth of field and chromatic dispersion
- Multithreaded CPU fallback — 32-thread render path when Metal is unavailable
- HDR output — saves both 8-bit PPM and 32-bit float framebuffers for post-processing
make # Metal GPU (default, macOS)
make cpu # CPU-only fallback













