There's a link somewhere on this thread, but I'm not sure if it's worth trying as it's very much work in progress only...
I've been messing with the terrain shader too, but I cannot get results that I like... They always look unrealistic in some way. I'd like to have proper extinction when visibility is low (no white haze, but grey or something) for example. And currently the skydome shader shows a black band which I assume is caused by mie scattering... bleh, too much tuning :p
Some images, these are different parts of the shader, so they just show some aspects of how the shader works...
First, light extinction caused by mie scattering when turbidity is 2 or 12 (clear weather vs. very misty)


And in scattering caused by rayleigh scattering:

Edit: One more, shows some effects when the values are way off (two hours after sunset):

I keep doing this, slowly, but I might get it done well enough some day..

Zan