Point light working

This commit is contained in:
Confideo-IOM
2026-08-16 13:47:11 +01:00
parent f9b696f9e8
commit 98ff54c106
50 changed files with 1187 additions and 357 deletions
@@ -5,6 +5,7 @@
#include "HydraShadowBuffer.h"
#include "../ecs/components/HydraDirectionalShadowSourceComponent.h"
#include "../ecs/components/HydraSpotShadowSourceComponent.h"
#include "../ecs/components/HydraPointShadowSourceComponent.h"
#include <queue>
#include <mutex>
@@ -16,18 +17,27 @@ class HydraShadowBufferManager : public HydraObject
void Shutdown();
HydraID AddDirectionalShadow(HydraDirectionalShadowSourceComponent shadow);
HydraID AddSpotShadow(HydraSpotShadowSourceComponent shadow);
HydraID AddPointShadow(HydraPointShadowSourceComponent shadow);
void UpdateDirectionalShadow(HydraID shadow_id, HydraDirectionalShadowSourceComponent shadow);
void UpdateSpotShadow(HydraID shadow_id, HydraSpotShadowSourceComponent shadow);
void UpdatePointShadow(HydraID shadow_id, HydraPointShadowSourceComponent shadow);
void RemoveDirectionalShadow(HydraID shadow_id);
void RemoveSpotShadow(HydraID shadow_id);
void RemovePointShadow(HydraID shadow_id);
void UpdateShadowBuffer();
private:
std::vector<HydraDirectionalShadowSourceComponent> m_directional_shadow_buffer;
std::vector<HydraSpotShadowSourceComponent> m_spot_shadow_buffer;
std::vector<HydraPointShadowSourceComponent> m_point_shadow_buffer;
std::queue<HydraID> m_available_dir;
std::queue<HydraID> m_available_spot;
std::queue<HydraID> m_available_point;
uint32_t m_directional_shadow_buffer_id;
uint32_t m_spot_shadow_buffer_id;
uint32_t m_point_shadow_buffer_id;
std::mutex m_mutex;
};