From 2f18555ee06f07d1b40d32368106527549f5f9fb Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 18 Dec 2018 14:42:45 -0800 Subject: [PATCH] removing comments and dead code, rewiring the debug --- interface/src/Menu.cpp | 25 +----- interface/src/SecondaryCamera.cpp | 17 +--- .../src/RenderableZoneEntityItem.cpp | 2 - .../src/RenderableZoneEntityItem.h | 1 - .../src/AssembleLightingStageTask.cpp | 5 -- .../src/AssembleLightingStageTask.h | 1 - .../src/DeferredLightingEffect.cpp | 21 ++--- .../render-utils/src/DeferredLightingEffect.h | 6 +- .../render-utils/src/RenderDeferredTask.cpp | 87 +++++++++---------- .../render-utils/src/RenderForwardTask.cpp | 79 ++++++++--------- 10 files changed, 94 insertions(+), 150 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 14106278cd..140d2a7ccc 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -398,15 +398,6 @@ Menu::Menu() { if (lightingModelConfig) { lightingModelConfig->setShadow(action->isChecked()); } - - /* auto mainViewShadowTaskConfig = renderConfig->getConfig("RenderMainView.RenderShadowTask"); - if (mainViewShadowTaskConfig) { - if (action->isChecked()) { - mainViewShadowTaskConfig->setPreset("Enabled"); - } else { - mainViewShadowTaskConfig->setPreset("None"); - } - }*/ } }); @@ -417,22 +408,8 @@ Menu::Menu() { auto lightingModelConfig = renderConfig->getConfig("RenderMainView.LightingModel"); if (lightingModelConfig) { lightingModelConfig->setAmbientOcclusion(action->isChecked()); - /* if (action->isChecked()) { - lightingModelConfig->setPreset("Enabled"); - } - else { - mainViewAmbientOcclusionConfig->setPreset("None"); - }*/ } - /* auto mainViewAmbientOcclusionConfig = renderConfig->getConfig("RenderMainView.AmbientOcclusion"); - if (mainViewAmbientOcclusionConfig) { - if (action->isChecked()) { - mainViewAmbientOcclusionConfig->setPreset("Enabled"); - } else { - mainViewAmbientOcclusionConfig->setPreset("None"); - } - }*/ - } + } }); addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::WorldAxes); diff --git a/interface/src/SecondaryCamera.cpp b/interface/src/SecondaryCamera.cpp index f8b656e627..12c9636746 100644 --- a/interface/src/SecondaryCamera.cpp +++ b/interface/src/SecondaryCamera.cpp @@ -272,22 +272,7 @@ public: void SecondaryCameraRenderTask::build(JobModel& task, const render::Varying& inputs, render::Varying& outputs, render::CullFunctor cullFunctor, bool isDeferred) { const auto cachedArg = task.addJob("SecondaryCamera"); - task.addJob("RenderSecondView", cullFunctor, true, render::ItemKey::TAG_BITS_1, render::ItemKey::TAG_BITS_1); -/* - const auto items = task.addJob("FetchCullSort", cullFunctor, render::ItemKey::TAG_BITS_1, render::ItemKey::TAG_BITS_1); - assert(items.canCast()); + task.addJob("RenderSecondView", cullFunctor, isDeferred, render::ItemKey::TAG_BITS_1, render::ItemKey::TAG_BITS_1); - // const auto lightingStageFramesAndZones = task.addJob("AssembleStages", items[0]); - const auto lightingStageFramesAndZones = task.addJob("AssembleStages", items); - - if (isDeferred) { - const render::Varying cascadeSceneBBoxes; - const auto renderInput = RenderDeferredTask::Input(items, lightingStageFramesAndZones, cascadeSceneBBoxes).asVarying(); - task.addJob("RenderDeferredTask", renderInput, false); - } else { - const auto renderInput = RenderForwardTask::Input(items, lightingStageFramesAndZones).asVarying(); - task.addJob("Forward", renderInput); - } -*/ task.addJob("EndSecondaryCamera", cachedArg); } \ No newline at end of file diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index 0986f35d8d..7c6e583ef4 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -43,7 +43,6 @@ void ZoneEntityRenderer::onRemoveFromSceneTyped(const TypedEntityPointer& entity if (!LightStage::isIndexInvalid(_sunIndex)) { _stage->removeLight(_sunIndex); _sunIndex = INVALID_INDEX; - _shadowIndex = INVALID_INDEX; } if (!LightStage::isIndexInvalid(_ambientIndex)) { _stage->removeLight(_ambientIndex); @@ -100,7 +99,6 @@ void ZoneEntityRenderer::doRender(RenderArgs* args) { // Do we need to allocate the light in the stage ? if (LightStage::isIndexInvalid(_sunIndex)) { _sunIndex = _stage->addLight(_sunLight); - // _shadowIndex = _stage->addShadow(_sunIndex, SUN_SHADOW_MAX_DISTANCE, SUN_SHADOW_CASCADE_COUNT); } else { _stage->updateLightArrayBuffer(_sunIndex); } diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.h b/libraries/entities-renderer/src/RenderableZoneEntityItem.h index 3e2690e1bd..32b5cf94a0 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.h +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.h @@ -99,7 +99,6 @@ private: ComponentMode _bloomMode { COMPONENT_MODE_INHERIT }; indexed_container::Index _sunIndex { LightStage::INVALID_INDEX }; - indexed_container::Index _shadowIndex { LightStage::INVALID_INDEX }; indexed_container::Index _ambientIndex { LightStage::INVALID_INDEX }; BackgroundStagePointer _backgroundStage; diff --git a/libraries/render-utils/src/AssembleLightingStageTask.cpp b/libraries/render-utils/src/AssembleLightingStageTask.cpp index ff9eaa195e..589cdb31ea 100644 --- a/libraries/render-utils/src/AssembleLightingStageTask.cpp +++ b/libraries/render-utils/src/AssembleLightingStageTask.cpp @@ -45,11 +45,6 @@ void AssembleLightingStageTask::build(JobModel& task, const render::Varying& inp // Fetch the current frame stacks from all the stages const auto currentStageFrames = task.addJob("FetchCurrentFrames"); - /* const auto lightFrame = currentStageFrames.getN(0); - const auto backgroundFrame = currentStageFrames.getN(1); - const auto hazeFrame = currentStageFrames.getN(2); - const auto bloomFrame = currentStageFrames.getN(3); -*/ output = Output(currentStageFrames, zones); } diff --git a/libraries/render-utils/src/AssembleLightingStageTask.h b/libraries/render-utils/src/AssembleLightingStageTask.h index c32d5f9a30..9770af473c 100644 --- a/libraries/render-utils/src/AssembleLightingStageTask.h +++ b/libraries/render-utils/src/AssembleLightingStageTask.h @@ -32,7 +32,6 @@ public: class AssembleLightingStageTask { public: - // using Input = RenderFetchCullSortTask::BucketList; using Input = RenderFetchCullSortTask::Output; using Output = render::VaryingSet2; using JobModel = render::Task::ModelIO; diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 7677d9b05f..ab9dea2325 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -603,19 +603,21 @@ void RenderDeferred::configure(const Config& config) { } void RenderDeferred::run(const RenderContextPointer& renderContext, const Inputs& inputs) { + auto args = renderContext->args; auto deferredTransform = inputs.get0(); auto deferredFramebuffer = inputs.get1(); - auto lightingModel = inputs.get2(); - auto surfaceGeometryFramebuffer = inputs.get3(); - auto ssaoFramebuffer = inputs.get4(); - auto subsurfaceScatteringResource = inputs.get5(); - auto lightClusters = inputs.get6(); - auto args = renderContext->args; + auto extraRenderBuffers = inputs.get2(); + auto surfaceGeometryFramebuffer = extraRenderBuffers.get0(); + auto ssaoFramebuffer = extraRenderBuffers.get1(); + auto subsurfaceScatteringResource = extraRenderBuffers.get2(); - const auto& lightFrame = inputs.get7(); - const auto& shadowFrame = inputs.get8(); - const auto& hazeFrame = inputs.get9(); + auto lightingModel = inputs.get3(); + auto lightClusters = inputs.get4(); + + const auto& lightFrame = inputs.get5(); + const auto& shadowFrame = inputs.get6(); + const auto& hazeFrame = inputs.get7(); if (!_gpuTimer) { _gpuTimer = std::make_shared < gpu::RangeTimer>(__FUNCTION__); @@ -684,7 +686,6 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { // Add the global light to the light stage (for later shadow rendering) // Set this light to be the default _defaultLightID = lightStage->addLight(lp, true); - // lightStage->addShadow(_defaultLightID); } auto backgroundStage = renderContext->_scene->getStage(); diff --git a/libraries/render-utils/src/DeferredLightingEffect.h b/libraries/render-utils/src/DeferredLightingEffect.h index cba9961389..f4935000ef 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.h +++ b/libraries/render-utils/src/DeferredLightingEffect.h @@ -174,9 +174,9 @@ using RenderDeferredConfig = render::GPUJobConfig; class RenderDeferred { public: - using Inputs = render::VaryingSet10< - DeferredFrameTransformPointer, DeferredFramebufferPointer, LightingModelPointer, SurfaceGeometryFramebufferPointer, - AmbientOcclusionFramebufferPointer, SubsurfaceScatteringResourcePointer, LightClustersPointer, LightStage::FramePointer, LightStage::ShadowFramePointer, HazeStage::FramePointer>; + using ExtraDeferredBuffer = render::VaryingSet3; + using Inputs = render::VaryingSet8< + DeferredFrameTransformPointer, DeferredFramebufferPointer, ExtraDeferredBuffer, LightingModelPointer, LightClustersPointer, LightStage::FramePointer, LightStage::ShadowFramePointer, HazeStage::FramePointer>; using Config = RenderDeferredConfig; using JobModel = render::Job::ModelI; diff --git a/libraries/render-utils/src/RenderDeferredTask.cpp b/libraries/render-utils/src/RenderDeferredTask.cpp index 38bc3f0c0e..2d2015658a 100644 --- a/libraries/render-utils/src/RenderDeferredTask.cpp +++ b/libraries/render-utils/src/RenderDeferredTask.cpp @@ -72,28 +72,19 @@ namespace gr { } -/* -class RenderDeferredTaskDebugConfig : public render::Task::Config { - -public: - - signals : - void dirty(); -};*/ - class RenderDeferredTaskDebug { public: + using ExtraBuffers = render::VaryingSet5; using Input = render::VaryingSet9; - // using Config = RenderDeferredTaskConfig; + AssembleLightingStageTask::Output, LightClusteringPass::Output, + PrepareDeferred::Outputs, ExtraBuffers, GenerateDeferredFrameTransform::Output, + JitterSample::Output, LightingModel>; + using JobModel = render::Task::ModelI; RenderDeferredTaskDebug(); - // void configure(const Config& config); void build(JobModel& task, const render::Varying& inputs, render::Varying& outputs); - private: }; @@ -221,8 +212,8 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren const auto lightClusters = task.addJob("LightClustering", lightClusteringPassInputs); // DeferredBuffer is complete, now let's shade it into the LightingBuffer - const auto deferredLightingInputs = RenderDeferred::Inputs(deferredFrameTransform, deferredFramebuffer, lightingModel, - surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, scatteringResource, lightClusters, lightFrame, shadowFrame, hazeFrame).asVarying(); + const auto extraDeferredBuffer = RenderDeferred::ExtraDeferredBuffer(surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, scatteringResource).asVarying(); + const auto deferredLightingInputs = RenderDeferred::Inputs(deferredFrameTransform, deferredFramebuffer, extraDeferredBuffer, lightingModel, lightClusters, lightFrame, shadowFrame, hazeFrame).asVarying(); task.addJob("RenderDeferred", deferredLightingInputs); // Similar to light stage, background stage has been filled by several potential render items and resolved for the frame in this job @@ -265,7 +256,9 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren // Debugging task is happening in the "over" layer after tone mapping and just before HUD { // Debug the bounds of the rendered items, still look at the zbuffer - const auto debugInputs = RenderDeferredTaskDebug::Input(fetchedItems, inputs.get2(), lightingStageInputs, lightClusters, linearDepthTarget, prepareDeferredOutputs, deferredFrameTransform, jitter, lightingModel).asVarying(); + const auto extraDebugBuffers = RenderDeferredTaskDebug::ExtraBuffers(linearDepthTarget, surfaceGeometryFramebuffer, ambientOcclusionOutputs, scatteringResource, velocityBuffer); + const auto debugInputs = RenderDeferredTaskDebug::Input(fetchedItems, inputs.get2(), lightingStageInputs, lightClusters, prepareDeferredOutputs, extraDebugBuffers, + deferredFrameTransform, jitter, lightingModel).asVarying(); task.addJob("DebugRenderDeferredTask", debugInputs); } @@ -289,10 +282,6 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren RenderDeferredTaskDebug::RenderDeferredTaskDebug() { } -/* -void RenderDeferredTaskDebug::configure(const Config& config) { - -}*/ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input, render::Varying& outputs) { @@ -300,20 +289,21 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input // RenderFetchCullSortTask out const auto& fetchCullSortTaskOut = inputs.get0(); - const auto& items = fetchCullSortTaskOut.get0(); - const auto& spatialSelection = fetchCullSortTaskOut[1]; + const auto& items = fetchCullSortTaskOut.get0(); - // Extract opaques / transparents / lights / metas / overlays InFront and HUD / background - const auto& opaques = items[RenderFetchCullSortTask::OPAQUE_SHAPE]; - const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE]; - const auto& lights = items[RenderFetchCullSortTask::LIGHT]; - const auto& metas = items[RenderFetchCullSortTask::META]; - const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE]; - const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE]; - const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE]; - const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE]; - const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE]; - const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE]; + // Extract opaques / transparents / lights / metas / overlays InFront and HUD / background + const auto& opaques = items[RenderFetchCullSortTask::OPAQUE_SHAPE]; + const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE]; + const auto& lights = items[RenderFetchCullSortTask::LIGHT]; + const auto& metas = items[RenderFetchCullSortTask::META]; + const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE]; + const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE]; + const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE]; + const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE]; + const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE]; + const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE]; + + const auto& spatialSelection = fetchCullSortTaskOut[1]; // RenderShadowTask out const auto& shadowOut = inputs.get1(); @@ -324,10 +314,10 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input const auto lightingStageInputs = inputs.get2(); // Fetch the current frame stacks from all the stages const auto stageCurrentFrames = lightingStageInputs.get0(); - const auto lightFrame = stageCurrentFrames[0]; - const auto backgroundFrame = stageCurrentFrames[1]; - const auto hazeFrame = stageCurrentFrames[2]; - const auto bloomFrame = stageCurrentFrames[3]; + const auto lightFrame = stageCurrentFrames[0]; + const auto backgroundFrame = stageCurrentFrames[1]; + const auto hazeFrame = stageCurrentFrames[2]; + const auto bloomFrame = stageCurrentFrames[3]; // Zones const auto& zones = lightingStageInputs[1]; @@ -335,11 +325,19 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input // Light CLuster const auto& lightClusters = inputs[3]; - // linear Depth Target - const auto& linearDepthTarget = inputs[4]; - // PrepareDeferred out - const auto& deferredFramebuffer = inputs[5]; + const auto& prepareDeferredOutputs = inputs.get4(); + const auto& deferredFramebuffer = prepareDeferredOutputs[0]; + + // extraDeferredBuffer + const auto& extraDeferredBuffer = inputs.get5(); + const auto& linearDepthTarget = extraDeferredBuffer.get0(); + const auto& surfaceGeometryFramebuffer = extraDeferredBuffer.get1(); + const auto& ambientOcclusionOut = extraDeferredBuffer.get2(); + const auto& ambientOcclusionFramebuffer = ambientOcclusionOut[0]; + const auto& ambientOcclusionUniforms = ambientOcclusionOut[1]; + const auto& scatteringResource = extraDeferredBuffer[3]; + const auto& velocityBuffer = extraDeferredBuffer[4]; // GenerateDeferredFrameTransform out const auto& deferredFrameTransform = inputs[6]; @@ -412,8 +410,9 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input // Debugging stages { + // Debugging Deferred buffer job - /* const auto debugFramebuffers = render::Varying(DebugDeferredBuffer::Inputs(deferredFramebuffer, linearDepthTarget, surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, velocityBuffer, deferredFrameTransform, lightFrame)); + const auto debugFramebuffers = DebugDeferredBuffer::Inputs(deferredFramebuffer, linearDepthTarget, surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, velocityBuffer, deferredFrameTransform, lightFrame).asVarying(); task.addJob("DebugDeferredBuffer", debugFramebuffers); const auto debugSubsurfaceScatteringInputs = DebugSubsurfaceScattering::Inputs(deferredFrameTransform, deferredFramebuffer, lightingModel, @@ -422,7 +421,7 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input const auto debugAmbientOcclusionInputs = DebugAmbientOcclusion::Inputs(deferredFrameTransform, deferredFramebuffer, linearDepthTarget, ambientOcclusionUniforms).asVarying(); task.addJob("DebugAmbientOcclusion", debugAmbientOcclusionInputs); -*/ + // Scene Octree Debugging job { task.addJob("DrawSceneOctree", spatialSelection); diff --git a/libraries/render-utils/src/RenderForwardTask.cpp b/libraries/render-utils/src/RenderForwardTask.cpp index 9f1f83dc20..7c266a32f5 100755 --- a/libraries/render-utils/src/RenderForwardTask.cpp +++ b/libraries/render-utils/src/RenderForwardTask.cpp @@ -48,62 +48,53 @@ using namespace render; extern void initForwardPipelines(ShapePlumber& plumber); void RenderForwardTask::build(JobModel& task, const render::Varying& input, render::Varying& output) { - const auto& inputs = input.get(); - const auto& fetchedItems = inputs.get0(); - // const auto& fetchedItems = inputs[0]; - // const auto& items = fetchedItems[0]; - const auto& items = fetchedItems.get0(); - - // Lighting model comes next, the big configuration of the view - const auto& lightingModel = inputs.get1(); - - const auto& lightingStageInputs = inputs.get2(); - // Fetch the current frame stacks from all the stages - const auto& currentStageFrames = lightingStageInputs.get0(); - const auto& lightFrame = currentStageFrames[0]; - const auto& backgroundFrame = currentStageFrames[1]; - const auto& hazeFrame = currentStageFrames[2]; - const auto& bloomFrame = currentStageFrames[3]; - - const auto& zones = lightingStageInputs[1]; - - - auto fadeEffect = DependencyManager::get(); - // Prepare the ShapePipelines + auto fadeEffect = DependencyManager::get(); ShapePlumberPointer shapePlumber = std::make_shared(); initForwardPipelines(*shapePlumber); - // Extract opaques / transparents / lights / metas / overlays / background - const auto& opaques = items[RenderFetchCullSortTask::OPAQUE_SHAPE]; - const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE]; - const auto& lights = items[RenderFetchCullSortTask::LIGHT]; - const auto& metas = items[RenderFetchCullSortTask::META]; - const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE]; - const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE]; - const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE]; - const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE]; - const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE]; - const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE]; + // Unpack inputs + const auto& inputs = input.get(); + + // Separate the fetched items + const auto& fetchedItems = inputs.get0(); - const auto& spatialSelection = fetchedItems[1]; + const auto& items = fetchedItems.get0(); + // Extract opaques / transparents / lights / metas / overlays / background + const auto& opaques = items[RenderFetchCullSortTask::OPAQUE_SHAPE]; + const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE]; + const auto& lights = items[RenderFetchCullSortTask::LIGHT]; + const auto& metas = items[RenderFetchCullSortTask::META]; + const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE]; + const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE]; + const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE]; + const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE]; + const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE]; + const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE]; + const auto& spatialSelection = fetchedItems.get1(); + + // Lighting model comes next, the big configuration of the view + const auto& lightingModel = inputs[1]; + + // Extract the Lighting Stages Current frame ( and zones) + const auto& lightingStageInputs = inputs.get2(); + // Fetch the current frame stacks from all the stages + const auto currentStageFrames = lightingStageInputs.get0(); + const auto lightFrame = currentStageFrames[0]; + const auto backgroundFrame = currentStageFrames[1]; + const auto& hazeFrame = currentStageFrames[2]; + const auto& bloomFrame = currentStageFrames[3]; + + const auto& zones = lightingStageInputs[1]; + + // First job, alter faded fadeEffect->build(task, opaques); // Prepare objects shared by several jobs const auto deferredFrameTransform = task.addJob("DeferredFrameTransform"); - // Filter zones from the general metas bucket - // const auto zones = task.addJob("ZoneRenderer", metas); - - // Fetch the current frame stacks from all the stages - // const auto currentFrames = task.addJob("FetchCurrentFrames"); - // const auto lightFrame = currentFrames.getN(0); - // const auto backgroundFrame = currentFrames.getN(1); - //const auto hazeFrame = currentFrames.getN(2); - //const auto bloomFrame = currentFrames.getN(3); - // GPU jobs: Start preparing the main framebuffer const auto framebuffer = task.addJob("PrepareFramebuffer");