mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:03:53 +02:00
FIxing the problem of shadows not repecting the cull group
This commit is contained in:
parent
f536f7b6c9
commit
072d0f262c
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue