Skip to content

Commit

Permalink
Don't render atmospheres for stars
Browse files Browse the repository at this point in the history
  • Loading branch information
375gnu committed Oct 9, 2024
1 parent 924fb56 commit 78a49d5
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/celengine/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3026,25 +3026,7 @@ void Renderer::renderStar(const Star& star,
rp.radius = star.getRadius();
rp.semiAxes = star.getEllipsoidSemiAxes();
rp.geometry = star.getGeometry();

Atmosphere atmosphere;

// Use atmosphere effect to give stars a fuzzy fringe
if (star.hasCorona() && rp.geometry == InvalidResource)
{
Color atmColor(color.red() * 0.5f, color.green() * 0.5f, color.blue() * 0.5f);
atmosphere.height = radius * CoronaHeight;
atmosphere.lowerColor = atmColor;
atmosphere.upperColor = atmColor;
atmosphere.skyColor = atmColor;

rp.atmosphere = &atmosphere;
}
else
{
rp.atmosphere = nullptr;
}

rp.atmosphere = nullptr;
rp.orientation = star.getRotationModel()->orientationAtTime(observer.getTime()).cast<float>();

renderObject(pos, distance, observer,
Expand Down

0 comments on commit 78a49d5

Please sign in to comment.