From 6f1fd19ac70859bb26ff0dcd51d21abab7a91179 Mon Sep 17 00:00:00 2001 From: Tleety Date: Mon, 18 Jan 2016 14:30:28 +0100 Subject: [PATCH] Directional lights now being filled into m_LightSources --- src/Engine/Rendering/LightCullingPass.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Engine/Rendering/LightCullingPass.cpp b/src/Engine/Rendering/LightCullingPass.cpp index d9cc8249..76f2045f 100644 --- a/src/Engine/Rendering/LightCullingPass.cpp +++ b/src/Engine/Rendering/LightCullingPass.cpp @@ -99,6 +99,18 @@ void LightCullingPass::FillLightList(RenderScene& scene) continue; } } + for(auto &job : scene.DirectionalLightJobs) { + auto directionalLightJob = std::dynamic_pointer_cast(job); + if(directionalLightJob) { + LightSource p; + p.Color = directionalLightJob->Color; + p.Intensity = directionalLightJob->Intensity; + p.Position = glm::vec4(glm::vec3(directionalLightJob->Position), 1.f); + p.Type = LightSource::Directional; + m_LightSources.push_back(p); + continue; + } + } } void LightCullingPass::InitializeSSBOs()