Skip to content

Commit

Permalink
[GameState] Match sky color and clear color properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Oct 29, 2023
1 parent 0893f01 commit 534c37a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/client/states/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void GameState::draw(RenderTarget &target, RenderStates states) const {
u32 iColor = (color.r255() << 24) | (color.g255() << 16) | (color.b255() << 8) | color.a255();
bgfx::setViewClear(states.view, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, iColor);

float colorPtr[4] = {color.r, color.g, color.b, color.a};
float colorPtr[4] = {color.r255() / 255.f, color.g255() / 255.f, color.b255() / 255.f, color.a255() / 255.f};
bgfx::setUniform(m_skyColor, colorPtr);

float sunlightIntensity[4] = {GameTime::getSunlightIntensityFromTime(time), 0, 0, 0};
Expand All @@ -250,7 +250,7 @@ void GameState::draw(RenderTarget &target, RenderStates states) const {
u32 iColor = (color.r255() << 24) | (color.g255() << 16) | (color.b255() << 8) | color.a255();
bgfx::setViewClear(states.view, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, iColor);

float colorPtr[4] = {color.r, color.g, color.b, color.a};
float colorPtr[4] = {color.r255() / 255.f, color.g255() / 255.f, color.b255() / 255.f, color.a255() / 255.f};
bgfx::setUniform(m_skyColor, colorPtr);

float sunlightIntensity[4] = {1.f, 0.f, 0.f, 0.f};
Expand Down

0 comments on commit 534c37a

Please sign in to comment.