feat: multiple lights kinda shadow support (shader is missing)
This commit is contained in:
@ -2,10 +2,25 @@
|
||||
#define COMPONENTS_LIGHT_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "renderer/renderer.h"
|
||||
|
||||
struct light {
|
||||
friend class Renderer;
|
||||
public:
|
||||
enum LightType {
|
||||
DIRECTIONAL = 0,
|
||||
};
|
||||
LightType type;
|
||||
glm::vec3 color;
|
||||
float intensity;
|
||||
|
||||
light(LightType t, const glm::vec3& c, float i)
|
||||
: type(t), color(c), intensity(i),
|
||||
shadowMap(0), fbo(0), lightSpace(1.0f) {}
|
||||
private:
|
||||
unsigned int shadowMap;
|
||||
unsigned int fbo;
|
||||
glm::mat4 lightSpace;
|
||||
};
|
||||
|
||||
#endif // COMPONENTS_LIGHT_H_
|
@ -23,8 +23,8 @@ private:
|
||||
Shader m_shader;
|
||||
Shader m_depthShader;
|
||||
|
||||
unsigned int m_depth_fbo;
|
||||
unsigned int m_depthMap;
|
||||
// unsigned int m_depth_fbo;
|
||||
// unsigned int m_depthMap;
|
||||
|
||||
glm::mat4 m_model;
|
||||
glm::mat4 m_proj;
|
||||
|
Reference in New Issue
Block a user