update Sky code
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4843 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: da4757831cccd3918c1a9140b48cff7bf1fd9945 Former-commit-id: ebd4d4368ba029c23b99010fa056ce0f0973abae
This commit is contained in:
parent
8855f40dea
commit
e5eaaa81fa
2 changed files with 5 additions and 9 deletions
|
@ -267,12 +267,6 @@ bool cGrSun::repaint( double sun_angle, double new_visibility )
|
|||
sun_color[1] = 1 - green_scat_f;
|
||||
i_halo_color[1] = 1 - ( 1.1 * green_scat_f );
|
||||
o_halo_color[1] = 1 - ( 1.4 * green_scat_f );
|
||||
|
||||
/*// Green - 546.1 nm
|
||||
float green_scat_f = ( aerosol_factor * path_distance * density_avg ) / 8.8938E+06;
|
||||
sun_color[1] = 1 - green_scat_f;
|
||||
i_halo_color[1] = 1 - ( 1.1 * green_scat_f );
|
||||
o_halo_color[1] = 1 - ( 1.4 * green_scat_f );*/
|
||||
|
||||
// Blue - 435.8 nm
|
||||
float blue_scat_f = ( aerosol_factor * path_distance * density_avg ) / 3.607E+06;
|
||||
|
@ -396,7 +390,7 @@ bool cGrSun::reposition( sgVec3 p, double angle, double rightAscension, double d
|
|||
/*if ( env_node )
|
||||
{
|
||||
//env_node->setDoubleValue( "atmosphere/altitude-troposphere-top", r_tropo - r_earth );
|
||||
//env_node->setDoubleValue( "atmosphere/altitude-half-to-sun", alt_half );
|
||||
//env_node->setDoubleValue( "atmosphere/altitude-half-to-sun", alt_half );
|
||||
}*/
|
||||
}
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ grInitBackground()
|
|||
default:
|
||||
GfLogWarning("Unsupported rain strength value %d (assuming none)",
|
||||
grTrack->local.rain);
|
||||
grVisibility = 15000.0;
|
||||
grVisibility = 12000.0;
|
||||
break;
|
||||
}//switch Rain
|
||||
|
||||
|
@ -372,6 +372,7 @@ grInitBackground()
|
|||
const GLfloat fog_exp2_density = sqrt_m_log01 / grVisibility;
|
||||
|
||||
//Setup overall light level according to rain if any
|
||||
|
||||
grUpdateLight();
|
||||
|
||||
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, Black);
|
||||
|
@ -978,7 +979,8 @@ grUpdateSky(double currentTime, double accelTime)
|
|||
void
|
||||
grShutdownBackground(void)
|
||||
{
|
||||
if (TheSky) {
|
||||
if (TheSky)
|
||||
{
|
||||
delete TheSky;
|
||||
TheSky = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue