Name change, but backwards

This commit is contained in:
Confideo-IOM
2026-08-04 18:32:37 +01:00
parent 3e8b8952f7
commit 2b3785e6af
45 changed files with 1079 additions and 498 deletions
@@ -11,8 +11,8 @@
#include "../renderer/HydraRenderer.h"
#include "../ecs/HydraECS.h"
#include "../ecs/systems/HydraRenderSystem.h"
#include "../ecs/systems/HydraShadowSourceSystem.h"
#include "../ecs/components/HydraShadowSourceComponent.h"
#include "../ecs/systems/HydraDirectionalShadowSourceSystem.h"
#include "../ecs/components/HydraDirectionalShadowSourceComponent.h"
#include "../mesh/StandardVertex.h"
#include "../actor/HydraActorManager.h"
#include "../actor/HydraOutputActor.h"
@@ -95,12 +95,12 @@ void HydraDeferredPipeline::_UpdateUBO()
buffer_manager->UpdateWholeBuffer(m_per_frame_output_ubo, &output_ubo);
glBindBuffer(GL_UNIFORM_BUFFER, m_per_frame_output_ubo);
std::shared_ptr<HydraShadowSourceSystem> sys = GetEngine()->ECS()->GetSystem<HydraShadowSourceSystem>();
std::shared_ptr<HydraDirectionalShadowSourceSystem> sys = GetEngine()->ECS()->GetSystem<HydraDirectionalShadowSourceSystem>();
HydraID texture_id = 0;
if(sys->Entities.size() > 0)
{
auto it = sys->Entities.begin();
HydraShadowSourceComponent shad_comp = GetEngine()->ECS()->GetComponent<HydraShadowSourceComponent>(*it);
HydraDirectionalShadowSourceComponent shad_comp = GetEngine()->ECS()->GetComponent<HydraDirectionalShadowSourceComponent>(*it);
texture_id = shad_comp.shadow_texture_id;
}
TextureDebugUBO texture_ubo = {};
@@ -163,7 +163,6 @@ void HydraDeferredPipeline::_CreateFrameBuffer()
tex_buffer_manager->BindTexture(normal_texture.texture_id, GL_TEXTURE_2D);
tex_buffer_manager->BindTexture(position_texture.texture_id, GL_TEXTURE_2D);
HydraBufferManager* buffer_manager = GetEngine()->BufferManager();
buffer_manager->UpdateWholeBuffer(m_output_texture_ubo, &actor->texture_buffers[0]);
glBindBuffer(GL_UNIFORM_BUFFER, m_output_texture_ubo);
@@ -11,7 +11,7 @@
#include "../renderer/HydraRenderer.h"
#include "../ecs/HydraECS.h"
#include "../ecs/systems/HydraRenderSystem.h"
#include "../ecs/systems/HydraShadowSourceSystem.h"
#include "../ecs/systems/HydraDirectionalShadowSourceSystem.h"
#include "../mesh/StandardVertex.h"
#include "../actor/HydraActorManager.h"
#include "../actor/HydraOutputActor.h"
@@ -30,7 +30,7 @@ void HydraShadowPipeline::Render()
{
HydraECS *ecs = GetEngine()->ECS();
std::shared_ptr<HydraRenderSystem> render_system = ecs->GetSystem<HydraRenderSystem>();
std::shared_ptr<HydraShadowSourceSystem> shadow_system = ecs->GetSystem<HydraShadowSourceSystem>();
std::shared_ptr<HydraDirectionalShadowSourceSystem> shadow_system = ecs->GetSystem<HydraDirectionalShadowSourceSystem>();
uint32_t shadow_idx = 0;
glViewport(0, 0, SHADOW_MAP_SIZE, SHADOW_MAP_SIZE);
@@ -47,7 +47,7 @@ void HydraShadowPipeline::Render()
{
_UpdateUBO(shadow_idx);
// _BindFrameBufferAttachments(entity_id);
HydraShadowSourceComponent shad_comp = GetEngine()->ECS()->GetComponent<HydraShadowSourceComponent>(entity_id);
HydraDirectionalShadowSourceComponent shad_comp = GetEngine()->ECS()->GetComponent<HydraDirectionalShadowSourceComponent>(entity_id);
glBindFramebuffer(GL_FRAMEBUFFER, shad_comp.frame_buffer_id);
// HydraTextureBuffer tex_buffer = GetEngine()->TextureBufferManager()->GetTexture(shad_comp.shadow_texture_id);
// glBindTextureUnit(tex_buffer.gl_tex_id, 0);
@@ -66,7 +66,6 @@ void HydraShadowPipeline::Render()
shadow_idx++;
}
// glDisable(GL_POLYGON_OFFSET_FILL);
}
@@ -133,7 +132,7 @@ void HydraShadowPipeline::_UpdateUBO(uint32_t shadow_idx)
void HydraShadowPipeline::_BindFrameBufferAttachments(HydraID entity_id)
{
HydraShadowSourceComponent shad_comp = GetEngine()->ECS()->GetComponent<HydraShadowSourceComponent>(entity_id);
HydraDirectionalShadowSourceComponent shad_comp = GetEngine()->ECS()->GetComponent<HydraDirectionalShadowSourceComponent>(entity_id);
glBindFramebuffer(GL_FRAMEBUFFER, shad_comp.frame_buffer_id);
glBindTextureUnit(0, 0);
}