I added a crucial enhancement to the distance dependent label transparency for galaxy and star labels!
Previously, the once attributed transparencies stayed constant when the field of view decreased, i.e. upon zooming in with "SHIFT mouse left" movement!
++++++++++++++++
Therefore the legibility of labels for very distant galaxies
and stars remained pretty bad for all fields of view.
Now this improves when zooming in! Yet there is the
same hierarchy of label transparencies in ANY given field of view.
++++++++++++++++
Here are the required code changes in src/celengine/render.cpp:
a) Stars:
----------
Replace the code in the curly parentheses starting about in line 6888 (CVS code!)
Code: Select all
if (dot(starDir, viewNormal) > cosFOV)
{
char nameBuffer[Renderer::MaxLabelLength];
starDB->getStarName(star, nameBuffer, sizeof(nameBuffer));
float distr = labelThresholdMag/max(1.0f, (faintestMag - 4.0f))/log10(1.0f + 1.0e-1f * distance);
if (distr > 1.0f)
distr = 1.0f;
renderer->addLabel(nameBuffer,
Color(0.5f, 0.5f, 1.0f, distr),
Point3f(relPos.x, relPos.y, relPos.z));
nLabelled++;
}
b) Galaxies:
--------------
Replace the code in the curly parentheses starting about in line 7269 (CVS code!)
Code: Select all
&& dot(relPos, viewNormal) > 0)
{
float distr = (1.0f - 0.5f * log10(relDistanceToScreen))/log10(1.0f + 8.0e-7f * distanceToDSO);
if (distr > 1.0f)
distr = 1.0f;
renderer->addLabel(dsoDB->getDSOName(dso),
Color(0.1f, 0.85f, 0.85f, distr),
Point3f(relPos.x, relPos.y, relPos.z));
}
Bye Fridger