Ultraviolet background radiation from cosmic structure formation