This version
An endless city traced cell by cell: an exact ray–box hit per building, filtered lit windows and fog.
How this version works
The fragment shader runs at a configured render scale of 0.6 and generates building heights from hashed grid coordinates, leaving a central road clear. Each pixel ray traverses four-unit grid cells and performs an exact ray-box intersection for each candidate building, with a separate ground-plane intersection. Surface normals provide directional diffuse shading, while hashed window cells select which windows glow. Window edges are filtered according to distance and resolution, then distant windows blend towards an average glow. Exponential fog merges surfaces into the orange-purple sky.
The trick in this version
The city is traced with grid traversal and exact box intersections rather than stepping through a distance field, which removes the overshoot and moiré of a naive raymarcher. Traversal stops at the nearest hit or the distance limit, with a maximum of 64 cells, and procedural generation avoids storing a city mesh.
Historical context · GPU
2009 · RGBA & TBC
Elevated
A whole mountain world with camera cuts and a sunrise, from a 4-kilobyte shader.
2007 · Farbrausch
fr-041: debris.
A city that collapses and rebuilds in long, directed camera shots, a demo that tells a story.
2000 · Farbrausch
fr-08: .the .product
A complete 3D journey with music in 64 kilobytes, generated at start-up, the template for procedural worlds.
- Platform
- GPU · GLSL
- Era
- GPU
- Rendered on
- GPU
- Tags
- grid traversal · ray tracing