How it worksGod rays are sunlight scattering off fog you can't otherwise see. Marching along each view ray, at every step it asks: is this point lit? — by shadow-marching a second ray toward the sun and checking whether a pillar blocks it. Lit fog adds a little glow into the eye; shadowed fog adds nothing, which is what carves the bright shafts between the pillars out of an even haze. A phase function biases scattering forward so the air near the sun glows brightest. More fog density makes the whole volume hazier and the shafts bolder.