Showing the changes to libraries/render-utils/src/RenderShadowTask.cpp (1 of 7 files). Show all
Unified · Split
| @@ -216,7 +216,7 @@ void RenderShadowTask::build(JobModel& task, const render::Varying& input, rende · 215 unmodified lines | |||
| 216 | task.addJob<RenderShadowSetup>("ShadowSetup"); | 216 | task.addJob<RenderShadowSetup>("ShadowSetup"); |
| 217 | 217 | ||
| 218 | for (auto i = 0; i < SHADOW_CASCADE_MAX_COUNT; i++) { | 218 | for (auto i = 0; i < SHADOW_CASCADE_MAX_COUNT; i++) { |
| 219 | const auto setupOutput = task.addJob<RenderShadowCascadeSetup>("ShadowCascadeSetup", i); | 219 | const auto setupOutput = task.addJob<RenderShadowCascadeSetup>("ShadowCascadeSetup", i, tagBits, tagMask); |
| 220 | const auto shadowFilter = setupOutput.getN<RenderShadowCascadeSetup::Outputs>(1); | 220 | const auto shadowFilter = setupOutput.getN<RenderShadowCascadeSetup::Outputs>(1); |
| 221 | 221 | ||
| 222 | // CPU jobs: | 222 | // CPU jobs: |
| @@ -259,14 +259,12 @@ void RenderShadowCascadeSetup::run(const render::RenderContextPointer& renderCon · 36 unmodified lines | |||
| 259 | // Cache old render args | 259 | // Cache old render args |
| 260 | RenderArgs* args = renderContext->args; | 260 | RenderArgs* args = renderContext->args; |
| 261 | 261 | ||
| 262 | // const auto& filterMask = inputs; | ||
| 263 | |||
| 264 | output.edit0() = args->_renderMode; | 262 | output.edit0() = args->_renderMode; |
| 265 | output.edit2() = args->_sizeScale; | 263 | output.edit2() = args->_sizeScale; |
| 266 | 264 | ||
| 267 | const auto globalShadow = lightStage->getCurrentKeyShadow(); | 265 | const auto globalShadow = lightStage->getCurrentKeyShadow(); |
| 268 | if (globalShadow && _cascadeIndex<globalShadow->getCascadeCount()) { | 266 | if (globalShadow && _cascadeIndex<globalShadow->getCascadeCount()) { |
| 269 | output.edit1() = ItemFilter::Builder::visibleWorldItems().withTypeShape().withOpaque().withoutLayered(); | 267 | output.edit1() = ItemFilter::Builder::visibleWorldItems().withTypeShape().withOpaque().withoutLayered().withTagBits(_tagBits, _tagMask); |
| 270 | 268 | ||
| 271 | globalShadow->setKeylightCascadeFrustum(_cascadeIndex, args->getViewFrustum(), SHADOW_FRUSTUM_NEAR, SHADOW_FRUSTUM_FAR); | 269 | globalShadow->setKeylightCascadeFrustum(_cascadeIndex, args->getViewFrustum(), SHADOW_FRUSTUM_NEAR, SHADOW_FRUSTUM_FAR); |
| 272 | 270 | ||