settings panel moved to xml (WIP)

This commit is contained in:
MihailRis
2024-04-20 03:01:37 +03:00
parent 7cb5b2eb70
commit 9cdf3ff016
33 changed files with 254 additions and 143 deletions
+2 -2
View File
@@ -150,7 +150,7 @@ void WorldRenderer::renderLevel(
Shader* shader = assets->getShader("main");
auto indices = level->content->getIndices();
float fogFactor = 15.0f / ((float)settings.chunks.loadDistance-2);
float fogFactor = 15.0f / ((float)settings.chunks.loadDistance.get()-2);
// Setting up main shader
shader->use();
@@ -158,7 +158,7 @@ void WorldRenderer::renderLevel(
shader->uniformMatrix("u_view", camera->getView());
shader->uniform1f("u_gamma", settings.graphics.gamma);
shader->uniform1f("u_fogFactor", fogFactor);
shader->uniform1f("u_fogCurve", settings.graphics.fogCurve);
shader->uniform1f("u_fogCurve", settings.graphics.fogCurve.get());
shader->uniform1f("u_dayTime", level->getWorld()->daytime);
shader->uniform3f("u_cameraPos", camera->position);
shader->uniform1i("u_cubemap", 1);