2023-10-26 18:37:29 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "Component/DirectionalLight.h"
|
|
|
|
|
#include "Component/PointLight.h"
|
2024-06-09 12:20:04 +02:00
|
|
|
#include "Graphics/Buffer.h"
|
|
|
|
|
#include "Graphics/Descriptor.h"
|
2023-10-26 18:37:29 +02:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
namespace Seele {
|
|
|
|
|
class LightEnvironment {
|
|
|
|
|
public:
|
2023-10-26 18:37:29 +02:00
|
|
|
LightEnvironment(Gfx::PGraphics graphics);
|
|
|
|
|
~LightEnvironment();
|
|
|
|
|
void reset();
|
|
|
|
|
void addDirectionalLight(Component::DirectionalLight dirLight);
|
|
|
|
|
void addPointLight(Component::PointLight pointLight);
|
|
|
|
|
void commit();
|
2023-11-05 10:36:01 +01:00
|
|
|
const Gfx::PDescriptorLayout getDescriptorLayout() const;
|
|
|
|
|
Gfx::PDescriptorSet getDescriptorSet();
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-11-01 23:12:30 +01:00
|
|
|
Gfx::OShaderBuffer directionalLights;
|
|
|
|
|
Gfx::OShaderBuffer pointLights;
|
2023-10-26 18:37:29 +02:00
|
|
|
Array<Component::DirectionalLight> dirs;
|
|
|
|
|
Array<Component::PointLight> points;
|
2023-11-01 23:12:30 +01:00
|
|
|
Gfx::ODescriptorLayout layout;
|
2023-11-05 10:36:01 +01:00
|
|
|
Gfx::PDescriptorSet set;
|
2023-10-26 18:37:29 +02:00
|
|
|
Gfx::PGraphics graphics;
|
|
|
|
|
};
|
|
|
|
|
DEFINE_REF(LightEnvironment)
|
2024-06-09 12:20:04 +02:00
|
|
|
} // namespace Seele
|