Only add RenderShadowTask if isDeferred

This commit is contained in:
Cristian Luis Duarte 2018-06-05 18:54:48 -03:00
parent c0c246c934
commit b38eae3731

View file

@ -19,7 +19,9 @@ void RenderViewTask::build(JobModel& task, const render::Varying& input, render:
// Warning : the cull functor passed to the shadow pass should only be testing for LOD culling. If frustum culling
// is performed, then casters not in the view frustum will be removed, which is not what we wish.
task.addJob<RenderShadowTask>("RenderShadowTask", cullFunctor, tagBits, tagMask);
if (isDeferred) {
task.addJob<RenderShadowTask>("RenderShadowTask", cullFunctor, tagBits, tagMask);
}
const auto items = task.addJob<RenderFetchCullSortTask>("FetchCullSort", cullFunctor, tagBits, tagMask);
assert(items.canCast<RenderFetchCullSortTask::Output>());