Pointlights are now using the pointlight component and the Light renderqueue to draw.
This commit is contained in:
@@ -17,6 +17,7 @@ public:
|
||||
|
||||
void GenerateNewFrustum();
|
||||
void CullLights();
|
||||
void FillLightList(RenderQueueCollection& rq);
|
||||
|
||||
GLuint FrustumSSBO() const { return m_FrustumSSBO; }
|
||||
GLuint LightSSBO() const { return m_LightSSBO; }
|
||||
@@ -49,8 +50,6 @@ private:
|
||||
};
|
||||
Frustum m_Frustums[80*45]; //TODO: Renderer: Make this change with resolution
|
||||
|
||||
void TEMPCreateLights();
|
||||
|
||||
//This should be a component
|
||||
struct PointLight {
|
||||
glm::vec4 Position = glm::vec4(0.f);
|
||||
@@ -60,7 +59,7 @@ private:
|
||||
float Falloff = 0.3f;
|
||||
float Padding = 1337;
|
||||
};
|
||||
PointLight m_PointLights[NUM_LIGHTS];
|
||||
std::vector<PointLight> m_PointLights;
|
||||
|
||||
struct LightGrid {
|
||||
float Start;
|
||||
|
||||
@@ -82,11 +82,12 @@ struct SpriteJob : RenderJob
|
||||
|
||||
struct PointLightJob : RenderJob
|
||||
{
|
||||
glm::vec3 Position;
|
||||
glm::vec3 SpecularColor = glm::vec3(1, 1, 1);
|
||||
glm::vec3 DiffuseColor = glm::vec3(1, 1, 1);
|
||||
float Radius = 1.f;
|
||||
float Intensity = 0.8f;
|
||||
glm::vec4 Position;
|
||||
glm::vec4 Color;
|
||||
float Radius;
|
||||
float Intensity;
|
||||
float Falloff;
|
||||
float padding = 123;
|
||||
|
||||
void CalculateHash() override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user