Skip to content

Commit

Permalink
Return star color calculation to what it previously was
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Nov 26, 2020
1 parent 8689e00 commit 868749b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/sky.cpp
Expand Up @@ -698,7 +698,7 @@ void Sky::draw_stars(video::IVideoDriver * driver, float wicked_time_of_day)
float tod = wicked_time_of_day < 0.5f ? wicked_time_of_day : (1.0f - wicked_time_of_day);
float starbrightness = (0.25f - fabsf(tod)) * 20.0f;
m_star_color = m_star_params.starcolor;
m_star_color.a = clamp(starbrightness * m_star_color.a, 0.0f, 1.0f);
m_star_color.a *= clamp(starbrightness, 0.0f, 1.0f);
if (m_star_color.a <= 0.0f) // Stars are only drawn when not fully transparent
return;
m_materials[0].DiffuseColor = m_materials[0].EmissiveColor = m_star_color.toSColor();
Expand Down

0 comments on commit 868749b

Please sign in to comment.