feat: shadow integration
This commit is contained in:
@ -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_
|
@ -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;
|
||||
|
Reference in New Issue
Block a user