Boltzmann had worked out how things could be discrete and it basically invented something like quantum theory in the 1860s. But he just thought it wasn't really the way it worked. Then Einstein came along and said, well, by the way, the electromagnetic field might actually be discreet. It might be made of photons. And then that explains how this all works. In 1905, Einstein wrote these three papers. One introduced relativity theory, one explained Brownian motion, and one introduced basically photons.