RayTracer — a ray tracer in ClickHouse SQL
Summary
RayTracer is a path tracer implemented entirely in ClickHouse SQL, rendering directly to PNG without UDFs or external code. The article explains how pixels are generated as rows, how 3D math is performed with SQL tuples, and how the per-pixel computation is parallelized, including constructive solid geometry for scene elements and a ray-marched terrain. It also covers running instructions, benchmarks, credits, and licensing, highlighting a novel use of SQL for graphics and rendering.