diff --git a/src/graphics/render/WorldRenderer.cpp b/src/graphics/render/WorldRenderer.cpp index 59ee5635..06952ad9 100644 --- a/src/graphics/render/WorldRenderer.cpp +++ b/src/graphics/render/WorldRenderer.cpp @@ -337,13 +337,12 @@ void WorldRenderer::draw( const auto& settings = engine.getSettings(); const auto& worldInfo = world->getInfo(); - skybox->refresh( - pctx, - worldInfo.daytime, - 1.0f + - glm::max(worldInfo.fog, weather.clouds * glm::sqrt(weather.intensity) * 0.5f) * 2.0f, - 4 - ); + float mie = 1.0f + glm::max( + worldInfo.fog, + weather.clouds * glm::sqrt(weather.intensity) * 0.5f + ) * 2.0f; + + skybox->refresh(pctx, worldInfo.daytime, mie, 4); const auto& assets = *engine.getAssets(); auto& linesShader = assets.require("lines"); @@ -355,8 +354,8 @@ void WorldRenderer::draw( Window::clearDepth(); // Drawing background sky plane - skybox->draw(pctx, camera, assets, worldInfo.daytime, worldInfo.fog); - + skybox->draw(pctx, camera, assets, worldInfo.daytime, mie); + /* Actually world render with depth buffer on */ { DrawContext ctx = wctx.sub(); ctx.setDepthTest(true);