3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-29 20:03:00 +02:00

WEll it sn not going to be that simple....

This commit is contained in:
Sam Gateau 2018-12-13 00:32:59 -08:00
parent 27da9b4542
commit 7f193d0e7c
3 changed files with 7 additions and 4 deletions

View file

@ -58,8 +58,8 @@ void RenderShadowTask::build(JobModel& task, const render::Varying& input, rende
// FIXME: calling this here before the zones/lights are drawn during the deferred/forward passes means we're actually using the frames from the previous draw
// Fetch the current frame stacks from all the stages
const auto currentFrames = task.addJob<FetchCurrentFrames>("FetchCurrentFrames");
const auto lightFrame = currentFrames.getN<FetchCurrentFrames::Output>(0);
// Starting with the Light Frame genreated in previous tasks
const auto& lightFrame = input;
const auto setupOutput = task.addJob<RenderShadowSetup>("ShadowSetup", lightFrame);
const auto queryResolution = setupOutput.getN<RenderShadowSetup::Outputs>(1);

View file

@ -49,9 +49,10 @@ class RenderShadowTask {
public:
// There is one AABox per shadow cascade
using Input = LightStage::FramePointer;
using Output = render::VaryingArray<AABox, SHADOW_CASCADE_MAX_COUNT>;
using Config = RenderShadowTaskConfig;
using JobModel = render::Task::ModelO<RenderShadowTask, Output, Config>;
using JobModel = render::Task::ModelIO<RenderShadowTask, Input, Output, Config>;
RenderShadowTask() {}
void build(JobModel& task, const render::Varying& inputs, render::Varying& outputs, render::CullFunctor cameraCullFunctor, uint8_t tagBits = 0x00, uint8_t tagMask = 0x00);

View file

@ -27,7 +27,9 @@ void RenderViewTask::build(JobModel& task, const render::Varying& input, render:
if (isDeferred) {
// Warning : the cull functor passed to the shadow pass should only be testing for LOD culling. If frustum culling
// is performed, then casters not in the view frustum will be removed, which is not what we wish.
const auto cascadeSceneBBoxes = task.addJob<RenderShadowTask>("RenderShadowTask", cullFunctor, tagBits, tagMask);
const auto& ligthStageFrame = lightingStageFramesAndZones.get<AssembleLightingStageTask::Output>().get0()[0];
const auto cascadeSceneBBoxes = task.addJob<RenderShadowTask>("RenderShadowTask", ligthStageFrame, cullFunctor, tagBits, tagMask);
const auto renderInput = RenderDeferredTask::Input(items, lightingStageFramesAndZones, cascadeSceneBBoxes).asVarying();
task.addJob<RenderDeferredTask>("RenderDeferredTask", renderInput, true);
} else {