From 072d0f262cc3bc4f1d3bfeb61ad164fbcf5f84e0 Mon Sep 17 00:00:00 2001 From: samcake Date: Mon, 21 May 2018 18:07:04 -0700 Subject: [PATCH] FIxing the problem of shadows not repecting the cull group --- libraries/render/src/render/CullTask.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libraries/render/src/render/CullTask.cpp b/libraries/render/src/render/CullTask.cpp index ce6755b893..f013b2c1d3 100644 --- a/libraries/render/src/render/CullTask.cpp +++ b/libraries/render/src/render/CullTask.cpp @@ -395,9 +395,13 @@ void CullShapeBounds::run(const RenderContextPointer& renderContext, const Input if (antiFrustum == nullptr) { for (auto& item : inItems.second) { if (test.solidAngleTest(item.bound) && test.frustumTest(item.bound)) { - const auto shapeKey = scene->getItem(item.id).getKey(); + const auto& theItem = scene->getItem(item.id); + const auto shapeKey = theItem.getKey(); if (cullFilter.test(shapeKey)) { outItems->second.emplace_back(item); + if (theItem.getKey().isMetaCullGroup()) { + theItem.fetchMetaSubItemBounds(outItems->second, (*scene)); + } } if (boundsFilter.test(shapeKey)) { outBounds += item.bound; @@ -407,9 +411,13 @@ void CullShapeBounds::run(const RenderContextPointer& renderContext, const Input } else { for (auto& item : inItems.second) { if (test.solidAngleTest(item.bound) && test.frustumTest(item.bound) && test.antiFrustumTest(item.bound)) { - const auto shapeKey = scene->getItem(item.id).getKey(); + const auto& theItem = scene->getItem(item.id); + const auto shapeKey = theItem.getKey(); if (cullFilter.test(shapeKey)) { outItems->second.emplace_back(item); + if (theItem.getKey().isMetaCullGroup()) { + theItem.fetchMetaSubItemBounds(outItems->second, (*scene)); + } } if (boundsFilter.test(shapeKey)) { outBounds += item.bound;