u_timer in the main shader

This commit is contained in:
MihailRis 2024-05-31 08:46:05 +03:00
parent 74042b5c2a
commit 5dd06b233e
2 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,9 @@
#include <algorithm>
#include <memory>
#include <glm/ext.hpp>
#include <glm/gtc/matrix_transform.hpp>
bool WorldRenderer::showChunkBorders = false;
WorldRenderer::WorldRenderer(Engine* engine, LevelFrontend* frontend, Player* player)
@ -160,6 +163,7 @@ void WorldRenderer::renderLevel(
shader->use();
shader->uniformMatrix("u_proj", camera->getProjection());
shader->uniformMatrix("u_view", camera->getView());
shader->uniform1f("u_timer", Window::time());
shader->uniform1f("u_gamma", settings.graphics.gamma.get());
shader->uniform1f("u_fogFactor", fogFactor);
shader->uniform1f("u_fogCurve", settings.graphics.fogCurve.get());

View File

@ -8,8 +8,6 @@
#include <string>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include <glm/gtc/matrix_transform.hpp>
class Level;
class Player;