Initially I made this for the ocean shader planar reflections demo which is still in making.
Here is BGE version of Simon Wallner’s sky implementation originally from 2002 GDC Presentation by Naty Hoffman and Arcot J. Preetham.
I added adaptive exposure control from scene luminance.
I got the source files HERE
some screenshots with hazy skies, clear sky is boring
night skies are not yet done properly
an blend here: http://dl.dropbox.com/u/11542084/preethamsky_terra.blend
not optimized much, but I am in a hurry.
controls as always:
WASD (sorry people with azerty) + mouse
LMB + mouse movement - moves the Sun
spacebar - antialiasing by laser blaster
in “lum.py”
lines 49, 50 and 51 you can play around with “g.reileigh” “g.turbidity” and “g.worldscale” values