mrdoob/three.js — pull request #4729 by zz85 (2014-04-26 18:37:20+00:00)
Title: Import Preetham Sky Shader and Example

Importing procedural sky shader (simulating atmospheric scattering) example as seen [here](https://twitter.com/BlurSpline/status/451782044335349760/photo/1)

This shader is based on Preetham Model and the code follows the work of Simon Wallner(@SimonWallner) and Martin Supitis.

`THREE.Sky` is simply a class containing a sphere mesh and its custom shader which could be easily added to other scenes.

Caveats: The last time I tested this example on a windows machine, the reds (mie coefficients) seems to be less saturated than it should be (like on my Mac). It renders correctly with chrome webgl software emulation, so I'm _suspecting_ that it could be an angle issue, although I haven't verified. Any bug fixes would be welcomed.

Possible improvements
- would like to see an improved version of this (Hosek-Wilkie Sky Model) implemented
- or perhaps the Precomputed Atmospheric Scattering (curious how the two would compare)
- support night shading (stars, moon etc)