fix sky sprites visibility
This commit is contained in:
parent
b1bb595169
commit
18773b3230
@ -337,13 +337,12 @@ void WorldRenderer::draw(
|
|||||||
const auto& settings = engine.getSettings();
|
const auto& settings = engine.getSettings();
|
||||||
const auto& worldInfo = world->getInfo();
|
const auto& worldInfo = world->getInfo();
|
||||||
|
|
||||||
skybox->refresh(
|
float mie = 1.0f + glm::max(
|
||||||
pctx,
|
worldInfo.fog,
|
||||||
worldInfo.daytime,
|
weather.clouds * glm::sqrt(weather.intensity) * 0.5f
|
||||||
1.0f +
|
) * 2.0f;
|
||||||
glm::max(worldInfo.fog, weather.clouds * glm::sqrt(weather.intensity) * 0.5f) * 2.0f,
|
|
||||||
4
|
skybox->refresh(pctx, worldInfo.daytime, mie, 4);
|
||||||
);
|
|
||||||
|
|
||||||
const auto& assets = *engine.getAssets();
|
const auto& assets = *engine.getAssets();
|
||||||
auto& linesShader = assets.require<Shader>("lines");
|
auto& linesShader = assets.require<Shader>("lines");
|
||||||
@ -355,7 +354,7 @@ void WorldRenderer::draw(
|
|||||||
Window::clearDepth();
|
Window::clearDepth();
|
||||||
|
|
||||||
// Drawing background sky plane
|
// 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 */ {
|
/* Actually world render with depth buffer on */ {
|
||||||
DrawContext ctx = wctx.sub();
|
DrawContext ctx = wctx.sub();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user