PBR Factored
This commit is contained in:
@@ -28,8 +28,8 @@ void HydraDirectionalLightActor::InitialiseComponents()
|
||||
|
||||
//light_comp.light_id = GetEngine()->LightBufferManager()->CreateLight(light);
|
||||
|
||||
light_comp.light_colour = glm::vec4(1,1,1,1);
|
||||
light_comp.light_intensity = 100.0f;
|
||||
light_comp.diffuse = glm::vec4(1,1,1,1);
|
||||
light_comp.intensity = 1.0f;
|
||||
light_comp.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_DIRECTIONAL);
|
||||
light_comp.entity_id = GetID();
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ void HydraPointLightActor::InitialiseComponents()
|
||||
HydraLightComponent light_comp = {};
|
||||
HydraECS *ecs = GetEngine()->ECS();
|
||||
|
||||
light_comp.light_colour = glm::vec4(1,1,1,1);
|
||||
light_comp.light_intensity = 10.0f;
|
||||
light_comp.diffuse = glm::vec4(1,1,1,1);
|
||||
light_comp.intensity = 100.0f;
|
||||
light_comp.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_POINT);
|
||||
light_comp.entity_id = GetID();
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "HydraSpotLightActor.h"
|
||||
#include "../engine/HydraEngine.h"
|
||||
#include "../actor/HydraActorManager.h"
|
||||
#include "../task/HydraTask.h"
|
||||
#include "../ecs/HydraECS.h"
|
||||
#include "../ecs/components/HydraPositionComponent.h"
|
||||
#include "../ecs/components/HydraMeshComponent.h"
|
||||
#include "../ecs/components/HydraRenderableComponent.h"
|
||||
#include "../ecs/components/HydraMaterialComponent.h"
|
||||
#include "../ecs/components/HydraLightComponent.h"
|
||||
|
||||
#include "../buffer/HydraLightBufferManager.h"
|
||||
#include "../buffer/HydraLightBuffer.h"
|
||||
|
||||
|
||||
|
||||
|
||||
void HydraSpotLightActor::InitialiseComponents()
|
||||
{
|
||||
HydraLightComponent light_comp = {};
|
||||
HydraECS *ecs = GetEngine()->ECS();
|
||||
|
||||
light_comp.diffuse = glm::vec4(1,1,1,1);
|
||||
light_comp.intensity = 100.0f;
|
||||
light_comp.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_SPOT);
|
||||
|
||||
light_comp.entity_id = GetID();
|
||||
|
||||
ecs->AddComponent<HydraLightComponent>(GetID(), light_comp);
|
||||
|
||||
HydraPositionComponent position_component;
|
||||
ecs->AddComponent<HydraPositionComponent>(GetID(), position_component);
|
||||
}
|
||||
|
||||
void HydraSpotLightActor::Destroy()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef HYDRASPOTLIGHTACTOR
|
||||
#define HYDRASPOTLIGHTACTOR
|
||||
|
||||
#include "HydraActor.h"
|
||||
|
||||
class CLASS_DEFINE HydraSpotLightActor : public HydraActor
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
virtual void InitialiseComponents() override;
|
||||
virtual void Destroy() override;
|
||||
|
||||
};
|
||||
|
||||
#endif /* HYDRASPOTLIGHTACTOR */
|
||||
Reference in New Issue
Block a user