feat: shadow integration

This commit is contained in:
2025-10-11 20:15:31 +02:00
parent f56e524d05
commit bedd6c3ca0
12 changed files with 399 additions and 112 deletions

View File

@ -1,6 +1,11 @@
#ifndef COMPONENTS_LIGHT_H_
#define COMPONENTS_LIGHT_H_
struct light {};
#include <glm/glm.hpp>
struct light {
glm::vec3 color;
float intensity;
};
#endif // COMPONENTS_LIGHT_H_

View File

@ -12,10 +12,22 @@ public:
Renderer();
void Render(entt::registry& registry);
void GenerateShadowMaps(entt::registry& registry);
void OnWindowResized(int w, int h);
private:
void ApplyLights(entt::registry& registry);
void UpdateView(entt::registry& registry);
void RenderScene(entt::registry& registry);
void SwitchShader(Shader* newShader);
private:
Shader m_shader;
Shader m_depthShader;
Shader* m_currentShader;
unsigned int m_depth_fbo;
unsigned int m_depthMap;
glm::mat4 m_model;
glm::mat4 m_proj;