Documentation
¶
Overview ¶
Command ray3d renders a small CPU ray-traced scene — spheres on a checkerboard floor with Lambert/Blinn-Phong shading, hard shadows, a mirror and glass — into the terminal using truecolor glyph modes (no ASCII ramp). With -renderer it switches among all the engines: the Monte-Carlo path tracer, bidirectional path tracing, Metropolis light transport, the light tracer, progressive photon mapping and ReSTIR direct lighting. It can instead export a PNG or an orbit GIF, add an .obj mesh, and it demonstrates the "scene over Reed-Solomon" codec: the whole world is shipped as ~100 bytes.
go run ./cmd/ray3d # raster render to the terminal go run ./cmd/ray3d -path -spp 64 # path-traced global illumination go run ./cmd/ray3d -renderer bdpt -spp 32 # bidirectional path tracing go run ./cmd/ray3d -renderer mlt -spp 64 # Metropolis light transport go run ./cmd/ray3d -renderer ppm # progressive photon mapping go run ./cmd/ray3d -png out.png # export a still go run ./cmd/ray3d -gif orbit.gif # export a turntable go run ./cmd/ray3d -mode sextant # denser glyph mode go run ./cmd/ray3d -obj model.obj # drop a mesh into the scene
Click to show internal directories.
Click to hide internal directories.