smallpt: A physically based ray tracer in just 99 lines of C++
blaizedsouza · x · 2026-09-17
Kevin Beason's smallpt implements a physically based ray tracer in just 99 lines of C++. The whole renderer boils down to vectors, rays, spheres, and a recursive radiance() function, tracing light with reflections, refractions, soft shadows, and color bleeding. It can render a Cornell box with mirror and glass spheres using thousands of samples per pixel — a classic minimal read for understanding ray tracing fundamentals.
More from coding & agent
- The 2026 AI engineer roadmap: six stacks from vector search to multi-agent ops — mdancho84 · 2026-09-17
- When the AI Agent Builds the Tool Instead of Doing the Task — Similar_Job_6080 · 2026-09-17
- huggingface_hub 1.32 lets UV scripts declare runtime images for HF Jobs — vanstriendaniel · 2026-09-17
- Open-sourced Qwen-1B-RLCD runs type-safe JSON inference 5x faster on-device — JiliJeanlouis · 2026-09-17
- Microsoft event to demo open-source agent evaluation and governance tools ASSERT and ACS — davemccollough · 2026-09-17
- Cybersecurity Compliance Startup Comp AI Raises $34M Series A Led by Roo Capital and Grand Ventures — JosephJacks_ · 2026-09-17