Infinite 3D grids with mod()
mod() domain repetition to 3D for infinite raymarched grids. Before evaluating the SDF, apply mod(p, spacing) - spacing * 0.5 to all three axes. Use floor(p / spacing) as a cell ID to vary each repeated object. Combine with lighting and fog for an infinite architectural look.