Sunshine catchup.

This commit is contained in:
Shyotl
2013-02-25 12:53:18 -06:00
parent 041481db89
commit 94a0040ddb
15 changed files with 281 additions and 172 deletions

View File

@@ -728,8 +728,8 @@ void LLVOWLSky::updateStarColors()
const F32 var = 0.15f;
const F32 min = 0.5f; //0.75f;
const F32 sunclose_max = 0.6f;
const F32 sunclose_range = 1 - sunclose_max;
//const F32 sunclose_max = 0.6f;
//const F32 sunclose_range = 1 - sunclose_max;
//F32 below_horizon = - llmin(0.0f, gSky.mVOSkyp->getToSunLast().mV[2]);
//F32 brightness_factor = llmin(1.0f, below_horizon * 20);
@@ -743,14 +743,14 @@ void LLVOWLSky::updateStarColors()
U32 x;
for (x = 0; x < getStarsNumVerts(); ++x)
{
F32 sundir_factor = 1;
//F32 sundir_factor = 1;
LLVector3 tostar = *v_p;
tostar.normVec();
const F32 how_close_to_sun = tostar * gSky.mVOSkyp->getToSunLast();
if (how_close_to_sun > sunclose_max)
{
sundir_factor = (1 - how_close_to_sun) / sunclose_range;
}
//const F32 how_close_to_sun = tostar * gSky.mVOSkyp->getToSunLast();
//if (how_close_to_sun > sunclose_max)
//{
// sundir_factor = (1 - how_close_to_sun) / sunclose_range;
//}
intensity = *(v_i);
F32 alpha = v_c->mV[VALPHA] + (ll_frand() - 0.5f) * var * intensity;
if (alpha < min * intensity)