Skip to content

Commit

Permalink
Fix sky color calculation
Browse files Browse the repository at this point in the history
somehow I missed half of the logic
  • Loading branch information
sfan5 committed Mar 24, 2024
1 parent b009d2e commit fcf2dd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mods/default/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ default.set_skybox = function(player, brightness)
elseif brightness >= 0.2 then
t = "_dawn"
end
local c = math.floor(brightness * 255)
local fog_color = string.format("#%02x%02x%02x", c, c, c)
-- multiply with #aac8e6, which is bgcolor_bright in game.cpp
local fog_color = string.format("#%02x%02x%02x", math.floor(brightness * 170),
math.floor(brightness * 200), math.floor(brightness * 230))
local params = {
fog = {
fog_start = 0.4,
Expand Down

0 comments on commit fcf2dd0

Please sign in to comment.