Lights
This commit is contained in:
+15
-11
@@ -43,18 +43,22 @@ void main()
|
||||
|
||||
output_colour = vec4(1,0,0,1);
|
||||
|
||||
// if(mat.diffuse_texture_id != INVALID_HYDRA_ID)
|
||||
// {
|
||||
// output_colour = vec4(0,1,0,1);
|
||||
// uvec2 diffuse_handle = textures[mat.diffuse_texture_id];
|
||||
// diffuse_val = diffuse_val * texture(sampler2D(diffuse_handle), geom_out.vsUV.xy);
|
||||
// output_colour = diffuse_val;
|
||||
// }
|
||||
if(mat.diffuse_texture_id != INVALID_HYDRA_ID)
|
||||
{
|
||||
output_colour = vec4(0,1,0,1);
|
||||
uvec2 diffuse_handle = textures[mat.diffuse_texture_id];
|
||||
diffuse_val = diffuse_val * texture(sampler2D(diffuse_handle), geom_out.vsUV.xy);
|
||||
if(mat.diffuse_texture_id== 10)
|
||||
{
|
||||
output_colour = vec4(0,0,1,1);
|
||||
}
|
||||
}
|
||||
|
||||
// if(diffuse_val[3] <= 0.4)
|
||||
// {
|
||||
// discard;
|
||||
// }
|
||||
if(diffuse_val[3] < 1.0)
|
||||
{
|
||||
discard;
|
||||
output_colour = vec4(0,1,1,1);
|
||||
}
|
||||
// Calculate the accurate, unclamped distance from the light source
|
||||
// output_colour = diffuse_val;
|
||||
// output_colour = vec4(geom_out.vsUV, 1,1);
|
||||
@@ -20,7 +20,6 @@ void HydraDirectionalLightActor::InitialiseComponents()
|
||||
{
|
||||
HydraLightComponent light_comp = {};
|
||||
HydraECS *ecs = GetEngine()->ECS();
|
||||
|
||||
|
||||
light_comp.diffuse = glm::vec4(1,1,1,1);
|
||||
light_comp.intensity = 10000.0f;
|
||||
|
||||
@@ -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"
|
||||
@@ -31,6 +32,9 @@ void HydraSpotLightActor::InitialiseComponents()
|
||||
|
||||
HydraPositionComponent position_component;
|
||||
ecs->AddComponent<HydraPositionComponent>(GetID(), position_component);
|
||||
|
||||
HydraShadowSourceComponent shadow_component = {};
|
||||
ecs->AddComponent<HydraShadowSourceComponent>(GetID(), shadow_component);
|
||||
}
|
||||
|
||||
void HydraSpotLightActor::Destroy()
|
||||
|
||||
@@ -63,8 +63,7 @@ HydraID HydraTextureBufferManager::LoadTexture(std::string texture_filename)
|
||||
GL_RGBA8,
|
||||
format,
|
||||
GL_NEAREST_MIPMAP_NEAREST,
|
||||
GL_LINEAR,
|
||||
1,
|
||||
GL_LINEAR,
|
||||
GL_UNSIGNED_BYTE,
|
||||
5,
|
||||
data,
|
||||
@@ -150,8 +149,7 @@ HydraID HydraTextureBufferManager::CreateTexture(std::string texture_name,
|
||||
uint32_t height,
|
||||
uint32_t internal_format,
|
||||
uint32_t min_filter,
|
||||
uint32_t mag_filter,
|
||||
uint32_t levels,
|
||||
uint32_t mag_filter,
|
||||
uint32_t format,
|
||||
uint32_t data_type,
|
||||
uint32_t mip_levels,
|
||||
@@ -160,9 +158,8 @@ HydraID HydraTextureBufferManager::CreateTexture(std::string texture_name,
|
||||
uint32_t gl_tex_id = 0;
|
||||
glCreateTextures(GL_TEXTURE_2D, 1, &gl_tex_id);
|
||||
glBindTexture(GL_TEXTURE_2D, gl_tex_id);
|
||||
|
||||
|
||||
glTextureStorage2D(gl_tex_id, levels, internal_format, width, height);
|
||||
glTextureStorage2D(gl_tex_id,1+ mip_levels, internal_format, width, height);
|
||||
|
||||
if (data != nullptr)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ class HydraTextureBufferManager : public HydraObject
|
||||
void Shutdown();
|
||||
HydraID CreateTexture(std::string texture_name,
|
||||
uint32_t width, uint32_t height, uint32_t internal_format,
|
||||
uint32_t min_filter, uint32_t mag_filter, uint32_t levels,
|
||||
uint32_t min_filter, uint32_t mag_filter,
|
||||
uint32_t format = GL_RGBA, uint32_t data_type = GL_UNSIGNED_BYTE, uint32_t mip_levels = 0, void* data = nullptr);
|
||||
|
||||
HydraID CreateTextureArray(std::string texture_name,
|
||||
|
||||
@@ -69,6 +69,10 @@ class HydraComponentArray : public IHydraComponentArray
|
||||
T& GetComponent(HydraID entity_id)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
if(m_entity_to_component.find(entity_id) == m_entity_to_component.end())
|
||||
{
|
||||
std::cout << "HERE";
|
||||
}
|
||||
assert(m_entity_to_component.find(entity_id) != m_entity_to_component.end() && "Trying to get a component that doesnt exist");
|
||||
HydraID component_index = m_entity_to_component[entity_id];
|
||||
return m_components[component_index];
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../../task/buffer/HydraUpdateWholeGPUBufferTask.hpp"
|
||||
#include "../../task/buffer/HydraUpdatePartialGPUBufferTask.hpp"
|
||||
#include "../../task/buffer/HydraCreateUnBoundTextureTask.hpp"
|
||||
#include "../../task/renderer/HydraCreateCascadeShadowFrameBuffer.hpp"
|
||||
#include "../../task/renderer/HydraCreateShadowFrameBuffer.hpp"
|
||||
#include "../../actor/HydraActorManager.h"
|
||||
|
||||
@@ -55,6 +56,7 @@ void HydraShadowSourceSystem::InitialiseComponent(HydraID entity_id)
|
||||
_InitialiseDirectionalLight(entity_id);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HydraShadowSourceSystem::UpdateSystem(float delta_t_seconds)
|
||||
@@ -68,9 +70,9 @@ void HydraShadowSourceSystem::UpdateSystem(float delta_t_seconds)
|
||||
HydraLightComponent &light_comp = ecs->GetComponent<HydraLightComponent>(entity_id);
|
||||
switch (light_comp.light_type)
|
||||
{
|
||||
case (int)HYDRA_LIGHT_TYPE::HYDRA_LIGHT_DIRECTIONAL:
|
||||
_UpdateDirectionalLight(entity_id);
|
||||
break;
|
||||
case (int)HYDRA_LIGHT_TYPE::HYDRA_LIGHT_DIRECTIONAL:
|
||||
_UpdateDirectionalLight(entity_id);
|
||||
break;
|
||||
}
|
||||
|
||||
HydraShadowSourceComponent shad_comp = ecs->GetComponent<HydraShadowSourceComponent>(entity_id);
|
||||
@@ -123,6 +125,27 @@ void HydraShadowSourceSystem::_UpdateDirectionalLight(HydraID entity_id)
|
||||
}
|
||||
}
|
||||
|
||||
void HydraShadowSourceSystem::_UpdateSpotLight(HydraID entity_id)
|
||||
{
|
||||
// HydraEngine *engine = GetEngine();
|
||||
// HydraECS *ecs = engine->ECS();
|
||||
// HydraPositionComponent pos_comp = ecs->GetComponent<HydraPositionComponent>(entity_id);
|
||||
// HydraShadowSourceComponent &shad_comp = ecs->GetComponent<HydraShadowSourceComponent>(entity_id);
|
||||
// HydraLightComponent light_comp = ecs->GetComponent<HydraLightComponent>(entity_id);
|
||||
|
||||
// float view_size = 50.0f;
|
||||
// float view_near = -100.0f;
|
||||
// float view_far = 100.0f;
|
||||
|
||||
// glm::mat4 view = pos_comp.transform;
|
||||
// glm::mat4 proj = glm::ortho<float>(-view_size, view_size, view_size, -view_size, view_near, view_far);
|
||||
|
||||
// shad_comp.far_plane[0] = view_far;
|
||||
// shad_comp.near_plane[0] = view_near;
|
||||
// shad_comp.light_space_proj[0] = proj;
|
||||
// shad_comp.light_space_view[0] = view;
|
||||
}
|
||||
|
||||
void HydraShadowSourceSystem::_InitialiseDirectionalLight(HydraID entity_id)
|
||||
{
|
||||
HydraEngine *engine = GetEngine();
|
||||
@@ -135,14 +158,32 @@ void HydraShadowSourceSystem::_InitialiseDirectionalLight(HydraID entity_id)
|
||||
HydraTaskScheduler *task_scheduler = GetEngine()->TaskScheduler();
|
||||
|
||||
uint32_t depth_texture_id = 0;
|
||||
HydraID create_framebuffer_task_id = task_scheduler->CreateTask<HydraCreateShadowFrameBuffer>(HydraThreadAffinity::Render);
|
||||
HydraCreateShadowFrameBuffer *fb_task = static_cast<HydraCreateShadowFrameBuffer *>(task_scheduler->GetTask(create_framebuffer_task_id));
|
||||
HydraID create_framebuffer_task_id = task_scheduler->CreateTask<HydraCreateCascadeShadowFrameBuffer>(HydraThreadAffinity::Render);
|
||||
HydraCreateCascadeShadowFrameBuffer *fb_task = static_cast<HydraCreateCascadeShadowFrameBuffer *>(task_scheduler->GetTask(create_framebuffer_task_id));
|
||||
fb_task->Initialise(&shad_comp.shadow_texture_id, &depth_texture_id, &shad_comp.frame_buffer_id);
|
||||
|
||||
task_scheduler->WaitForTask(create_framebuffer_task_id);
|
||||
shad_comp.shadow_texture_id = depth_texture_id;
|
||||
}
|
||||
void HydraShadowSourceSystem::_InitialiseSpotLight(HydraID entity_id)
|
||||
{
|
||||
// HydraEngine *engine = GetEngine();
|
||||
// HydraECS *ecs = engine->ECS();
|
||||
// HydraTextureBufferManager *tex_man = engine->TextureBufferManager();
|
||||
// HydraShadowSourceComponent &shad_comp = ecs->GetComponent<HydraShadowSourceComponent>(entity_id);
|
||||
// shad_comp.entity_id = entity_id;
|
||||
// shad_comp.cascade_count = 6;
|
||||
|
||||
// HydraTaskScheduler *task_scheduler = GetEngine()->TaskScheduler();
|
||||
|
||||
// uint32_t depth_texture_id = 0;
|
||||
// HydraID create_framebuffer_task_id = task_scheduler->CreateTask<HydraCreateShadowFrameBuffer>(HydraThreadAffinity::Render);
|
||||
// HydraCreateShadowFrameBuffer *fb_task = static_cast<HydraCreateShadowFrameBuffer *>(task_scheduler->GetTask(create_framebuffer_task_id));
|
||||
// fb_task->Initialise(&shad_comp.shadow_texture_id, &depth_texture_id, &shad_comp.frame_buffer_id);
|
||||
|
||||
// task_scheduler->WaitForTask(create_framebuffer_task_id);
|
||||
// shad_comp.shadow_texture_id = depth_texture_id;
|
||||
}
|
||||
void HydraShadowSourceSystem::_WriteToGPU()
|
||||
{
|
||||
HydraEngine *engine = GetEngine();
|
||||
|
||||
@@ -17,7 +17,9 @@ class HydraShadowSourceSystem : public HydraSystem
|
||||
void UpdateSystem(float delta_t_seconds) override;
|
||||
private:
|
||||
void _UpdateDirectionalLight(HydraID entity_id);
|
||||
void _UpdateSpotLight(HydraID entity_id);
|
||||
void _InitialiseDirectionalLight(HydraID entity_id);
|
||||
void _InitialiseSpotLight(HydraID entity_id);
|
||||
void _WriteToGPU();
|
||||
HydraID m_shadow_buffer_id = INVALID_HYDRA_ID;
|
||||
std::queue<HydraID> m_available_shadows;
|
||||
|
||||
@@ -285,8 +285,7 @@ void HydraGLTFLoader::_ProcessGLTFTextures(aiScene const *scene, std::vector<uin
|
||||
height,
|
||||
GL_RGBA8,
|
||||
GL_LINEAR_MIPMAP_LINEAR,
|
||||
GL_LINEAR,
|
||||
1,
|
||||
GL_LINEAR,
|
||||
GL_RGBA,
|
||||
GL_UNSIGNED_BYTE,
|
||||
5,
|
||||
|
||||
@@ -111,9 +111,9 @@ void HydraShadowPipeline::_CreateRenderStage()
|
||||
|
||||
std::vector<uint32_t> textures;
|
||||
|
||||
render_stage->Initialise(shader_path + "shadow_shader.vert",
|
||||
shader_path + "shadow_shader.frag",
|
||||
shader_path + "shadow_shader.geom",
|
||||
render_stage->Initialise(shader_path + "shadow_cascade_shader.vert",
|
||||
shader_path + "shadow_cascade_shader.frag",
|
||||
shader_path + "shadow_cascade_shader.geom",
|
||||
shader_binding,
|
||||
0,
|
||||
textures,
|
||||
|
||||
@@ -16,8 +16,7 @@ private:
|
||||
uint32_t m_data_type;
|
||||
uint32_t m_mip_levels;
|
||||
uint32_t m_min_filter;
|
||||
uint32_t m_mag_filter;
|
||||
uint32_t m_levels;
|
||||
uint32_t m_mag_filter;
|
||||
uint32_t m_target;
|
||||
void *m_data;
|
||||
HydraID *m_texture_id;
|
||||
@@ -30,8 +29,7 @@ public:
|
||||
m_width, m_height,
|
||||
m_internal_format,
|
||||
m_min_filter,
|
||||
m_mag_filter,
|
||||
m_levels,
|
||||
m_mag_filter,
|
||||
m_format,
|
||||
m_data_type,
|
||||
m_mip_levels,
|
||||
@@ -45,8 +43,7 @@ public:
|
||||
uint32_t internal_format,
|
||||
uint32_t format,
|
||||
uint32_t min_filter,
|
||||
uint32_t mag_filter,
|
||||
uint32_t levels,
|
||||
uint32_t mag_filter,
|
||||
uint32_t data_type,
|
||||
uint32_t mip_levels,
|
||||
void *data,
|
||||
@@ -62,8 +59,7 @@ public:
|
||||
m_data = data;
|
||||
m_texture_id = texture_id;
|
||||
m_min_filter = min_filter;
|
||||
m_mag_filter = mag_filter;
|
||||
m_levels = levels;
|
||||
m_mag_filter = mag_filter;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,8 +16,7 @@ private:
|
||||
uint32_t m_data_type;
|
||||
uint32_t m_mip_levels;
|
||||
uint32_t m_min_filter;
|
||||
uint32_t m_mag_filter;
|
||||
uint32_t m_levels;
|
||||
uint32_t m_mag_filter;
|
||||
void *m_data;
|
||||
HydraID *m_texture_id;
|
||||
|
||||
@@ -29,8 +28,7 @@ public:
|
||||
m_width, m_height,
|
||||
m_internal_format,
|
||||
m_min_filter,
|
||||
m_mag_filter,
|
||||
m_levels,
|
||||
m_mag_filter,
|
||||
m_format,
|
||||
m_data_type,
|
||||
m_mip_levels,
|
||||
@@ -43,8 +41,7 @@ public:
|
||||
uint32_t internal_format,
|
||||
uint32_t format,
|
||||
uint32_t min_filter,
|
||||
uint32_t mag_filter,
|
||||
uint32_t levels,
|
||||
uint32_t mag_filter,
|
||||
uint32_t data_type,
|
||||
uint32_t mip_levels,
|
||||
void *data,
|
||||
@@ -62,7 +59,7 @@ public:
|
||||
m_texture_id = texture_id;
|
||||
m_min_filter = min_filter;
|
||||
m_mag_filter = mag_filter;
|
||||
m_levels = levels;
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#ifndef HYDRACREATECASCADESHADOWFRAMEBUFFER
|
||||
#define HYDRACREATECASCADESHADOWFRAMEBUFFER
|
||||
|
||||
#include "../HydraTask.h"
|
||||
#include "../../engine/HydraEngine.h"
|
||||
#include "../../renderer/HydraRenderer.h"
|
||||
#include <GLMIncludes.h>
|
||||
#include "../../GlewIncludes.h"
|
||||
#include "../../buffer/HydraTextureBufferManager.h"
|
||||
|
||||
class HydraCreateCascadeShadowFrameBuffer : public HydraTask
|
||||
{
|
||||
private:
|
||||
uint32_t *m_texture_id = 0;
|
||||
uint32_t *m_depth_texture_id = 0;
|
||||
uint32_t *m_frame_buffer_id = nullptr;
|
||||
|
||||
protected:
|
||||
public:
|
||||
void Process() override
|
||||
{
|
||||
HydraEngine *engine = GetEngine();
|
||||
|
||||
HydraTextureBufferManager *tex_buffer_manager = engine->TextureBufferManager();
|
||||
HydraRenderSettings render_settings = engine->RenderSettings();
|
||||
|
||||
*m_texture_id = tex_buffer_manager->CreateTextureArray("shadow_FB",
|
||||
SHADOW_MAP_SIZE, SHADOW_MAP_SIZE,
|
||||
GL_RGBA8,
|
||||
GL_NEAREST,
|
||||
GL_NEAREST,
|
||||
6);
|
||||
|
||||
HydraTextureBuffer texture = tex_buffer_manager->GetTexture(*m_texture_id);
|
||||
|
||||
*m_depth_texture_id = tex_buffer_manager->CreateTextureArray("shadow_depth_buffer",
|
||||
SHADOW_MAP_SIZE, SHADOW_MAP_SIZE,
|
||||
GL_DEPTH_COMPONENT32F,
|
||||
GL_NEAREST,
|
||||
GL_NEAREST,
|
||||
6);
|
||||
|
||||
HydraTextureBuffer depth_texture = tex_buffer_manager->GetTexture(*m_depth_texture_id);
|
||||
glGenFramebuffers(1, m_frame_buffer_id);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, *m_frame_buffer_id);
|
||||
|
||||
glTextureParameteri(texture.gl_tex_id, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTextureParameteri(texture.gl_tex_id, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
// FIX 1: Set explicit filters for the depth texture to prevent incomplete attachment
|
||||
glTextureParameteri(depth_texture.gl_tex_id, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTextureParameteri(depth_texture.gl_tex_id, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
||||
glm::vec4 border = glm::vec4(1,1,1,1);
|
||||
|
||||
glTextureParameteri(depth_texture.gl_tex_id, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
|
||||
glTextureParameteri(depth_texture.gl_tex_id, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
|
||||
glTextureParameterfv(depth_texture.gl_tex_id, GL_TEXTURE_BORDER_COLOR, &border[0]);
|
||||
|
||||
glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texture.gl_tex_id, 0);
|
||||
glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, depth_texture.gl_tex_id, 0);
|
||||
|
||||
glNamedFramebufferDrawBuffer(*m_frame_buffer_id, GL_COLOR_ATTACHMENT0);
|
||||
glNamedFramebufferReadBuffer(*m_frame_buffer_id, GL_COLOR_ATTACHMENT0);
|
||||
|
||||
GLenum draw_buffers[] = {GL_COLOR_ATTACHMENT0};
|
||||
glNamedFramebufferDrawBuffers(*m_frame_buffer_id, 1, draw_buffers);
|
||||
|
||||
GLenum status = glCheckNamedFramebufferStatus(*m_frame_buffer_id, GL_FRAMEBUFFER);
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE)
|
||||
{
|
||||
std::cout << "Framebuffer error: " << status << std::endl;
|
||||
}
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
|
||||
tex_buffer_manager->BindTexture(*m_depth_texture_id, GL_TEXTURE_2D_ARRAY);
|
||||
|
||||
}
|
||||
void Initialise(uint32_t *texture_id, uint32_t *depth_texture_id, uint32_t *frame_buffer_id)
|
||||
{
|
||||
m_texture_id = texture_id;
|
||||
m_frame_buffer_id = frame_buffer_id;
|
||||
m_depth_texture_id = depth_texture_id;
|
||||
}
|
||||
};
|
||||
#endif /* HYDRACREATESHADOWFRAMEBUFFER */
|
||||
@@ -1,11 +1,13 @@
|
||||
#ifndef HYDRACREATESHADOWFRAMEBUFFER
|
||||
#define HYDRACREATESHADOWFRAMEBUFFER
|
||||
|
||||
|
||||
#include "../HydraTask.h"
|
||||
#include "../../engine/HydraEngine.h"
|
||||
#include "../../renderer/HydraRenderer.h"
|
||||
#include <GLMIncludes.h>
|
||||
#include "../../GlewIncludes.h"
|
||||
#include "../../buffer/HydraTextureBufferManager.h"
|
||||
|
||||
class HydraCreateShadowFrameBuffer : public HydraTask
|
||||
{
|
||||
@@ -13,7 +15,7 @@ private:
|
||||
uint32_t *m_texture_id = 0;
|
||||
uint32_t *m_depth_texture_id = 0;
|
||||
uint32_t *m_frame_buffer_id = nullptr;
|
||||
|
||||
|
||||
protected:
|
||||
public:
|
||||
void Process() override
|
||||
@@ -23,21 +25,21 @@ public:
|
||||
HydraTextureBufferManager *tex_buffer_manager = engine->TextureBufferManager();
|
||||
HydraRenderSettings render_settings = engine->RenderSettings();
|
||||
|
||||
*m_texture_id = tex_buffer_manager->CreateTextureArray("shadow_FB",
|
||||
*m_texture_id = tex_buffer_manager->CreateTexture("shadow_FB",
|
||||
SHADOW_MAP_SIZE, SHADOW_MAP_SIZE,
|
||||
GL_RGBA8,
|
||||
GL_NEAREST,
|
||||
GL_NEAREST,
|
||||
6);
|
||||
1);
|
||||
|
||||
HydraTextureBuffer texture = tex_buffer_manager->GetTexture(*m_texture_id);
|
||||
|
||||
*m_depth_texture_id = tex_buffer_manager->CreateTextureArray("shadow_depth_buffer",
|
||||
*m_depth_texture_id = tex_buffer_manager->CreateTexture("shadow_depth_buffer",
|
||||
SHADOW_MAP_SIZE, SHADOW_MAP_SIZE,
|
||||
GL_DEPTH_COMPONENT32F,
|
||||
GL_NEAREST,
|
||||
GL_NEAREST,
|
||||
6);
|
||||
1);
|
||||
|
||||
HydraTextureBuffer depth_texture = tex_buffer_manager->GetTexture(*m_depth_texture_id);
|
||||
glGenFramebuffers(1, m_frame_buffer_id);
|
||||
@@ -72,7 +74,8 @@ public:
|
||||
}
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
|
||||
tex_buffer_manager->BindTexture(*m_depth_texture_id, GL_TEXTURE_2D_ARRAY);
|
||||
tex_buffer_manager->BindTexture(*m_depth_texture_id, GL_TEXTURE_2D);
|
||||
|
||||
}
|
||||
void Initialise(uint32_t *texture_id, uint32_t *depth_texture_id, uint32_t *frame_buffer_id)
|
||||
{
|
||||
@@ -81,4 +84,6 @@ public:
|
||||
m_depth_texture_id = depth_texture_id;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* HYDRACREATESHADOWFRAMEBUFFER */
|
||||
|
||||
Reference in New Issue
Block a user