Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 13 files). Show all
Unified · Split
| @@ -101,12 +101,11 @@ void RenderDeferredTask::configure(const Config& config) { · 100 unmodified lines | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void RenderDeferredTask::build(JobModel& task, const render::Varying& input, render::Varying& output, render::CullFunctor cullFunctor, size_t depth) { | 103 | void RenderDeferredTask::build(JobModel& task, const render::Varying& input, render::Varying& output, render::CullFunctor cullFunctor, size_t depth) { |
| 104 | static auto fadeEffect = DependencyManager::get<FadeEffect>(); | ||
| 105 | // Prepare the ShapePipelines | 104 | // Prepare the ShapePipelines |
| 106 | static ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>(); | 105 | static ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>(); |
| 107 | static std::once_flag once; | 106 | static std::once_flag once; |
| 108 | std::call_once(once, [] { | 107 | std::call_once(once, [] { |
| 109 | initDeferredPipelines(*shapePlumber, fadeEffect->getBatchSetter(), fadeEffect->getItemUniformSetter()); | 108 | initDeferredPipelines(*shapePlumber, FadeEffect::getBatchSetter(), FadeEffect::getItemUniformSetter()); |
| 110 | }); | 109 | }); |
| 111 | 110 | ||
| 112 | const auto& inputs = input.get<Input>(); | 111 | const auto& inputs = input.get<Input>(); |
| @@ -146,7 +145,9 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 33 unmodified lines | |||
| 146 | // Shadow Stage Frame | 145 | // Shadow Stage Frame |
| 147 | const auto shadowFrame = shadowTaskOutputs[1]; | 146 | const auto shadowFrame = shadowTaskOutputs[1]; |
| 148 | 147 | ||
| 149 | fadeEffect->build(task, opaques); | 148 | if (depth == 0) { |
| 149 | task.addJob<FadeEffect>("FadeEffect", opaques); | ||
| 150 | } | ||
| 150 | 151 | ||
| 151 | const auto jitter = task.addJob<JitterSample>("JitterCam"); | 152 | const auto jitter = task.addJob<JitterSample>("JitterCam"); |
| 152 | 153 | ||