Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 5 files). Show all
Unified · Split
| @@ -217,6 +217,8 @@ void DrawDeferred::run(const SceneContextPointer& sceneContext, const RenderCont · 216 unmodified lines | ||
| 217 | 217 | |
| 218 | 218 | gpu::doInBatch(args->_context, [&](gpu::Batch& batch) { |
| 219 | 219 | args->_batch = &batch; |
| 220 | + | |
| 221 | + // Setup camera, projection and viewport for all items | |
| 220 | 222 | batch.setViewportTransform(args->_viewport); |
| 221 | 223 | batch.setStateScissorRect(args->_viewport); |
| 222 | 224 | |
| @@ -228,6 +230,9 @@ void DrawDeferred::run(const SceneContextPointer& sceneContext, const RenderCont · 5 unmodified lines | ||
| 228 | 230 | batch.setProjectionTransform(projMat); |
| 229 | 231 | batch.setViewTransform(viewMat); |
| 230 | 232 | |
| 233 | + // Setup lighting model for all items; | |
| 234 | + batch.setUniformBuffer(render::ShapePipeline::Slot::LIGHTING_MODEL, lightingModel->getParametersBuffer()); | |
| 235 | + | |
| 231 | 236 | renderShapes(sceneContext, renderContext, _shapePlumber, inItems, _maxDrawn); |
| 232 | 237 | args->_batch = nullptr; |
| 233 | 238 | }); |
| @@ -248,6 +253,8 @@ void DrawStateSortDeferred::run(const SceneContextPointer& sceneContext, const R · 14 unmodified lines | ||
| 248 | 253 | |
| 249 | 254 | gpu::doInBatch(args->_context, [&](gpu::Batch& batch) { |
| 250 | 255 | args->_batch = &batch; |
| 256 | + | |
| 257 | + // Setup camera, projection and viewport for all items | |
| 251 | 258 | batch.setViewportTransform(args->_viewport); |
| 252 | 259 | batch.setStateScissorRect(args->_viewport); |
| 253 | 260 | |
| @@ -259,6 +266,9 @@ void DrawStateSortDeferred::run(const SceneContextPointer& sceneContext, const R · 5 unmodified lines | ||
| 259 | 266 | batch.setProjectionTransform(projMat); |
| 260 | 267 | batch.setViewTransform(viewMat); |
| 261 | 268 | |
| 269 | + // Setup lighting model for all items; | |
| 270 | + batch.setUniformBuffer(render::ShapePipeline::Slot::LIGHTING_MODEL, lightingModel->getParametersBuffer()); | |
| 271 | + | |
| 262 | 272 | if (_stateSort) { |
| 263 | 273 | renderStateSortShapes(sceneContext, renderContext, _shapePlumber, inItems, _maxDrawn); |
| 264 | 274 | } else { |
| @@ -315,6 +325,9 @@ void DrawOverlay3D::run(const SceneContextPointer& sceneContext, const RenderCon · 50 unmodified lines | ||
| 315 | 325 | batch.setProjectionTransform(projMat); |
| 316 | 326 | batch.setViewTransform(viewMat); |
| 317 | 327 | |
| 328 | + // Setup lighting model for all items; | |
| 329 | + batch.setUniformBuffer(render::ShapePipeline::Slot::LIGHTING_MODEL, lightingModel->getParametersBuffer()); | |
| 330 | + | |
| 318 | 331 | renderShapes(sceneContext, renderContext, _shapePlumber, inItems, _maxDrawn); |
| 319 | 332 | args->_batch = nullptr; |
| 320 | 333 | }); |
| @@ -361,7 +374,8 @@ void DrawBackgroundDeferred::run(const SceneContextPointer& sceneContext, const · 40 unmodified lines | ||
| 361 | 374 | assert(renderContext->args->hasViewFrustum()); |
| 362 | 375 | |
| 363 | 376 | const auto& inItems = inputs.get0(); |
| 364 | − const auto& lightingModel = inputs.get1(); | |
| 377 | + // Not used yet | |
| 378 | + // const auto& lightingModel = inputs.get1(); | |
| 365 | 379 | |
| 366 | 380 | RenderArgs* args = renderContext->args; |
| 367 | 381 | doInBatch(args->_context, [&](gpu::Batch& batch) { |