shadow start
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "../ecs/components/HydraRenderableComponent.h"
|
||||
#include "../ecs/components/HydraMaterialComponent.h"
|
||||
#include "../ecs/components/HydraLightComponent.h"
|
||||
#include "../ecs/components/HydraShadowSourceComponent.h"
|
||||
|
||||
#include "../buffer/HydraLightBufferManager.h"
|
||||
#include "../buffer/HydraLightBuffer.h"
|
||||
@@ -20,23 +21,19 @@ void HydraDirectionalLightActor::InitialiseComponents()
|
||||
HydraLightComponent light_comp = {};
|
||||
HydraECS *ecs = GetEngine()->ECS();
|
||||
|
||||
// HydraLightBuffer light = {};
|
||||
// light.light_colour = glm::vec3(1,1,1);
|
||||
// light.light_direction = glm::vec3(0,0,0);
|
||||
// light.light_intensity = 1;
|
||||
// light.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_DIRECTIONAL);
|
||||
|
||||
//light_comp.light_id = GetEngine()->LightBufferManager()->CreateLight(light);
|
||||
|
||||
|
||||
light_comp.diffuse = glm::vec4(1,1,1,1);
|
||||
light_comp.intensity = 1.0f;
|
||||
light_comp.intensity = 1000.0f;
|
||||
light_comp.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_DIRECTIONAL);
|
||||
light_comp.entity_id = GetID();
|
||||
|
||||
ecs->AddComponent<HydraLightComponent>(GetID(), light_comp);
|
||||
|
||||
HydraPositionComponent position_component;
|
||||
HydraPositionComponent position_component = {};
|
||||
ecs->AddComponent<HydraPositionComponent>(GetID(), position_component);
|
||||
|
||||
HydraShadowSourceComponent shadow_component = {};
|
||||
ecs->AddComponent<HydraShadowSourceComponent>(GetID(), shadow_component);
|
||||
}
|
||||
|
||||
void HydraDirectionalLightActor::Destroy()
|
||||
|
||||
@@ -24,6 +24,7 @@ void HydraOutputActor::_CreateMaterial()
|
||||
GL_RGBA8,
|
||||
GL_NEAREST,
|
||||
GL_NEAREST);
|
||||
|
||||
HydraID depth = engine->TextureBufferManager()->CreateTexture("deferred_depth",
|
||||
render_settings.DisplayWidth,
|
||||
render_settings.DisplayHeight,
|
||||
@@ -52,6 +53,7 @@ void HydraOutputActor::_CreateMaterial()
|
||||
GL_NEAREST,
|
||||
GL_NEAREST);
|
||||
|
||||
|
||||
// engine->TextureBufferManager()->BindTexture(depth);
|
||||
// engine->TextureBufferManager()->BindTexture(buffer_0);
|
||||
texture_buffers.resize(16);
|
||||
|
||||
Reference in New Issue
Block a user