Atmosphere

 Function Name  Parameter  Return  Explain
 getHG None number Get G value in Henyey Greenstein approximation function. (0-1, smaller value cause bigger sun).
 setHG number None Set G value
 getInscattering None number mul, add Get inscattering factors, for joined lighting
 setInscattering number mul [ , add ] None Set inscattering factors; ( inscattering = inscattering * mul + add )
 getExtinction None number mul, add Get extinction factors, for absorbed lighting
 setExtinction number mul [ , add ] None Set extinction factors; ( extinction = extinction * mul + add )
 getRay None number Get Rayleigh scattering factor
 setRay number None Set Rayleigh scattering factor
 getMie None number Get Mie scattering factor (bigger value cause turbid atmosphere)
 setMie number None Set Mie scattering factor
 getSunny None number Get sunny factor ( 0 ~ 1 : rainy to sunny )
 setSunny number None Set sunny factor
 getDistanceScale None number Get distance factor
 setDistanceScale number None Set distance factor (the effect is like scaling geometry mesh)
 getSkyDistanceAdjust None number Get distance adjust factor for sky
 setSkyDistanceAdjust number None Set distance adjust factor for sky
(sky usually bigger than terrain, so use a factor to adjust)
  Lib Function  Parameter  Return  Explain
 new  Material List  Atmosphere  

Example:

---for sunny weather---
atmo.setSunny(1)
atmo.setMie(0.01)
atmo.setHG(0.8)
sun.setIntensity(40)

---for rainy weather---
atmo.setSunny(0)
atmo.setMie(0.1)
atmo.setHG(0.1)
sun.setIntensity(16)

Remark:

About all there coefficients, please see:

"Rendering Outdoor Light Scattering in Real Time" by Naty Hoffman & Arcot J Preetham