Atmosphere.cpp   Atmosphere.cpp 
skipping to change at line 266 skipping to change at line 266
float lumi; float lumi;
// Compute the sky color for every point above the ground // Compute the sky color for every point above the ground
for (int i=0; i<(1+skyResolutionX)*(1+skyResolutionY); ++i) for (int i=0; i<(1+skyResolutionX)*(1+skyResolutionY); ++i)
{ {
const Vec2f &v(posGrid[i]); const Vec2f &v(posGrid[i]);
prj->unProject(v[0],v[1],point); prj->unProject(v[0],v[1],point);
Q_ASSERT(fabs(point.lengthSquared()-1.0) < 1e-10); Q_ASSERT(fabs(point.lengthSquared()-1.0) < 1e-10);
// Use mirroring for sun only
if (point[2]<=0) if (point[2]<=0)
{ {
point[2] = -point[2]; point[2] = -point[2];
// The sky below the ground is the symmetric of the one above : // The sky below the ground is the symmetric of the one above :
// it looks nice and gives proper values for brightn ess estimation // it looks nice and gives proper values for brightn ess estimation
// Use the Skybright.cpp 's models for brightness wh
ich gives better results.
lumi = skyb.getLuminance(moon_pos[0]*point[0]+moon_p
os[1]*point[1]-
moon_pos[2]*point[2], sunPos[0]*poin
t[0]+sunPos[1]*point[1]+
sunPos[2]*point[2], point[2]);
}
else
{
// Use the Skybright.cpp 's models for brightness wh
ich gives better results.
lumi = skyb.getLuminance(moon_pos[0]*point[0]+moon_p
os[1]*point[1]+
moon_pos[2]*point[2], sunPos[0]*poin
t[0]+sunPos[1]*point[1]+
sunPos[2]*point[2], point[2]);
} }
// Use the Skybright.cpp 's models for brightness which give
s better results.
lumi = skyb.getLuminance(moon_pos[0]*point[0]+moon_pos[1]*po
int[1]+
moon_pos[2]*point[2], sunPos[0]*point[0]+sun
Pos[1]*point[1]+
sunPos[2]*point[2], point[2]);
lumi *= eclipseFactor; lumi *= eclipseFactor;
// Add star background luminance // Add star background luminance
lumi += 0.0001f; lumi += 0.0001f;
// Multiply by the input scale of the ToneConverter (is not done automatically by the xyYtoRGB method called later) // Multiply by the input scale of the ToneConverter (is not done automatically by the xyYtoRGB method called later)
//lumi*=eye->getInputScale(); //lumi*=eye->getInputScale();
// Add the light pollution luminance AFTER the scaling to av oid scaling it because it is the cause // Add the light pollution luminance AFTER the scaling to av oid scaling it because it is the cause
// of the scaling itself // of the scaling itself
lumi += lightPollutionLuminance; lumi += lightPollutionLuminance;
 End of changes. 3 change blocks. 
8 lines changed or deleted 18 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/