The optical density of air is not that great. Water yes but not air.
Actually the density of air is very significant across long distances.
Have you ever noticed that at noon when the sun is overhead it is incredibly intense and blinding, and that it is painful to look at?
Then, just before evening when the sun is near the horizon it becomes incredibly faded and its color diluted. When the sun is near the horizon it is possible to look at the sun casually without squinting or being blinded by its intensity. The sun has become dimmer by an order of magnitude.
This is because during its setting the rays of the sun must pass through much more horizontal atmosphere than when the sun is overhead at noonday. The more atmosphere the sun's light must pass through, the dimmer and more diluted it becomes.