feat: light improvements

This commit is contained in:
2025-10-18 17:34:15 +02:00
parent 8b8ad35d01
commit fa9076b834
5 changed files with 57 additions and 45 deletions

View File

@ -23,6 +23,7 @@ private:
unsigned int shadowMap;
unsigned int fbo;
glm::mat4 lightSpace;
int shadowRes{1024};
};
#endif // COMPONENTS_LIGHT_H_

View File

@ -6,6 +6,7 @@
#include "engine/renderer/shader.h"
#include "engine/export.h"
#include "engine/components/light.h"
// TODO: make static or singleton
class ENGINE_API Renderer {
@ -21,6 +22,7 @@ private:
void ApplyLights(Shader &shader);
void UpdateView();
void RenderScene(Shader &shader);
void EnsureShadowResources(light& l);
private:
Shader m_shader;
Shader m_depthShader;