Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 25 files). Show all
Unified · Split
| @@ -147,7 +147,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 146 unmodified lines | |||
| 147 | 147 | ||
| 148 | // Render transparent objects forward in LightingBuffer | 148 | // Render transparent objects forward in LightingBuffer |
| 149 | const auto transparentsInputs = DrawDeferred::Inputs(transparents, lightingModel).hasVarying(); | 149 | const auto transparentsInputs = DrawDeferred::Inputs(transparents, lightingModel).hasVarying(); |
| 150 | task.addJob<DrawDeferred>("DrawTransparentDeferred", transparentsInputs, shapePlumber); | 150 | task.addJob<DrawDeferred>("DrawTransparentDeferred", transparentsInputs, shapePlumber, fadeMaskMap); |
| 151 | 151 | ||
| 152 | // LIght Cluster Grid Debuging job | 152 | // LIght Cluster Grid Debuging job |
| 153 | { | 153 | { |
| @@ -276,6 +276,16 @@ void DrawDeferred::run(const RenderContextPointer& renderContext, const Inputs& · 122 unmodified lines | |||
| 276 | if (lightingModel->isWireframeEnabled()) { | 276 | if (lightingModel->isWireframeEnabled()) { |
| 277 | keyBuilder.withWireframe(); | 277 | keyBuilder.withWireframe(); |
| 278 | } | 278 | } |
| 279 | // Prepare fade effect | ||
| 280 | batch.setResourceTexture(ShapePipeline::Slot::MAP::FADE_MASK, _fadeMaskMap); | ||
| 281 | if (_debugFade) { | ||
| 282 | args->_debugFlags = static_cast<RenderArgs::DebugFlags>(args->_debugFlags | | ||
| 283 | static_cast<int>(RenderArgs::RENDER_DEBUG_FADE)); | ||
| 284 | args->_debugFadePercent = _debugFadePercent; | ||
| 285 | // Force fade for everyone | ||
| 286 | keyBuilder.withFade(); | ||
| 287 | } | ||
| 288 | |||
| 279 | ShapeKey globalKey = keyBuilder.build(); | 289 | ShapeKey globalKey = keyBuilder.build(); |
| 280 | args->_globalShapeKey = globalKey._flags.to_ulong(); | 290 | args->_globalShapeKey = globalKey._flags.to_ulong(); |
| 281 | 291 | ||
| @@ -283,6 +293,13 @@ void DrawDeferred::run(const RenderContextPointer& renderContext, const Inputs& · 1 unmodified line | |||
| 283 | 293 | ||
| 284 | args->_batch = nullptr; | 294 | args->_batch = nullptr; |
| 285 | args->_globalShapeKey = 0; | 295 | args->_globalShapeKey = 0; |
| 296 | |||
| 297 | // Not sure this is really needed... | ||
| 298 | if (_debugFade) { | ||
| 299 | // Turn off fade debug | ||
| 300 | args->_debugFlags = static_cast<RenderArgs::DebugFlags>(args->_debugFlags & | ||
| 301 | ~static_cast<int>(RenderArgs::RENDER_DEBUG_FADE)); | ||
| 302 | } | ||
| 286 | }); | 303 | }); |
| 287 | 304 | ||
| 288 | config->setNumDrawn((int)inItems.size()); | 305 | config->setNumDrawn((int)inItems.size()); |