Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 6 files). Show all
Unified · Split
| @@ -39,6 +39,8 @@ · 38 unmodified lines | ||
| 39 | 39 | #include "AntialiasingEffect.h" |
| 40 | 40 | #include "ToneMappingEffect.h" |
| 41 | 41 | #include "SubsurfaceScattering.h" |
| 42 | +#include "PickItemsJob.h" | |
| 43 | +#include "RenderOutline.h" | |
| 42 | 44 | |
| 43 | 45 | #include <gpu/StandardShaderLib.h> |
| 44 | 46 | |
| @@ -85,6 +87,16 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 40 unmodified lines | ||
| 85 | 87 | // draw a stencil mask in hidden regions of the framebuffer. |
| 86 | 88 | task.addJob<PrepareStencil>("PrepareStencil", primaryFramebuffer); |
| 87 | 89 | |
| 90 | + // Select items that need to be outlined | |
| 91 | + const auto outlinedOpaques = task.addJob<PickItemsJob>("PickOutlined", opaques); | |
| 92 | + | |
| 93 | + // Render opaque outline objects first in DeferredBuffer | |
| 94 | + const auto opaqueOutlineInputs = DrawStateSortDeferred::Inputs(outlinedOpaques, lightingModel).hasVarying(); | |
| 95 | + task.addJob<DrawStateSortDeferred>("DrawOpaqueOutlined", opaqueOutlineInputs, shapePlumber); | |
| 96 | + | |
| 97 | + // Retrieve z value of the outlined objects | |
| 98 | + const auto outlinedZBuffer = task.addJob<PrepareOutline>("PrepareOutline", deferredFramebuffer); | |
| 99 | + | |
| 88 | 100 | // Render opaque objects in DeferredBuffer |
| 89 | 101 | const auto opaqueInputs = DrawStateSortDeferred::Inputs(opaques, lightingModel).hasVarying(); |
| 90 | 102 | task.addJob<DrawStateSortDeferred>("DrawOpaqueDeferred", opaqueInputs, shapePlumber); |