An OSL Shader based on Nishitas atmospheric scattering model: http://www.scratchapixel.com/lessons/3d-advanced-lessons/simulating-the-colors-of-the-sky/atmospheric-scattering/