Skip to content
Permalink
Browse files

Return star color calculation to what it previously was

  • Loading branch information
sfan5 committed Nov 26, 2020
1 parent 8689e00 commit 868749b4f8e898be0c01f892ea78d859d054c17e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/client/sky.cpp
@@ -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();

0 comments on commit 868749b

Please sign in to comment.