Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 111 files). Show all
Unified · Split
| @@ -102,12 +102,11 @@ void RenderDeferredTask::configure(const Config& config) { · 101 unmodified lines | ||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | void RenderDeferredTask::build(JobModel& task, const render::Varying& input, render::Varying& output, render::CullFunctor cullFunctor, size_t depth) { |
| 105 | − static auto fadeEffect = DependencyManager::get<FadeEffect>(); | |
| 106 | 105 | // Prepare the ShapePipelines |
| 107 | 106 | static ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>(); |
| 108 | 107 | static std::once_flag once; |
| 109 | 108 | std::call_once(once, [] { |
| 110 | − initDeferredPipelines(*shapePlumber, fadeEffect->getBatchSetter(), fadeEffect->getItemUniformSetter()); | |
| 109 | + initDeferredPipelines(*shapePlumber, FadeEffect::getBatchSetter(), FadeEffect::getItemUniformSetter()); | |
| 111 | 110 | }); |
| 112 | 111 | |
| 113 | 112 | const auto& inputs = input.get<Input>(); |
| @@ -147,7 +146,9 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 33 unmodified lines | ||
| 147 | 146 | // Shadow Stage Frame |
| 148 | 147 | const auto shadowFrame = shadowTaskOutputs[1]; |
| 149 | 148 | |
| 150 | − fadeEffect->build(task, opaques); | |
| 149 | + if (depth == 0) { | |
| 150 | + task.addJob<FadeEffect>("FadeEffect", opaques); | |
| 151 | + } | |
| 151 | 152 | |
| 152 | 153 | const auto jitter = task.addJob<JitterSample>("JitterCam"); |
| 153 | 154 | |
| @@ -257,7 +258,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 103 unmodified lines | ||
| 257 | 258 | const auto toneMappedBuffer = task.addJob<ToneMapAndResample>("ToneMapping", toneMappingInputs); |
| 258 | 259 | |
| 259 | 260 | // Debugging task is happening in the "over" layer after tone mapping and just before HUD |
| 260 | − { // Debug the bounds of the rendered items, still look at the zbuffer | |
| 261 | + if (depth == 0) { // Debug the bounds of the rendered items, still look at the zbuffer | |
| 261 | 262 | const auto extraDebugBuffers = RenderDeferredTaskDebug::ExtraBuffers(linearDepthTarget, surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, ambientOcclusionUniforms, scatteringResource, velocityBuffer); |
| 262 | 263 | const auto debugInputs = RenderDeferredTaskDebug::Input(fetchedItems, shadowTaskOutputs, lightingStageInputs, lightClusters, prepareDeferredOutputs, extraDebugBuffers, |
| 263 | 264 | deferredFrameTransform, jitter, lightingModel).asVarying(); |