Skip to content

Commit

Permalink
Normalize point source color
Browse files Browse the repository at this point in the history
See Issue CelestiaProject#2016

Pedro noted that old addons use [ 0 0 0 ] in order for object to not get rendered as points; this is handled by the condition at the beginning, which excludes such objects (and so they do not get rendered anyway).
  • Loading branch information
AstroChara authored Dec 19, 2023
1 parent ed5d1cb commit b054057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/celengine/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2966,13 +2966,13 @@ void Renderer::renderPlanet(Body& body,
}
}

if (body.isVisibleAsPoint())
if (body.isVisibleAsPoint() && body.getSurface().color.toVector3().maxCoeff() > 0.0f)
{
renderObjectAsPoint(pos,
body.getRadius(),
appMag,
discSizeInPixels,
body.getSurface().color,
body.getSurface().color / body.getSurface().color.maxCoeff(),
false, false, m);
}
}
Expand Down

0 comments on commit b054057

Please sign in to comment.