From 5d83284ac59ae680408285ae05c0cc1f67999772 Mon Sep 17 00:00:00 2001 From: Olivier Prat Date: Thu, 26 Oct 2017 16:47:20 +0200 Subject: [PATCH] Fixed small bug in shadow bounds computation --- libraries/render/src/render/SortTask.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/render/src/render/SortTask.cpp b/libraries/render/src/render/SortTask.cpp index f789f8c5c6..987b25358a 100644 --- a/libraries/render/src/render/SortTask.cpp +++ b/libraries/render/src/render/SortTask.cpp @@ -140,8 +140,14 @@ void DepthSortShapesAndComputeBounds::run(const RenderContextPointer& renderCont if (outItems == outShapes.end()) { outItems = outShapes.insert(std::make_pair(pipeline.first, ItemBounds{})).first; } + AABox bounds; - depthSortItems(renderContext, _frontToBack, inItems, outItems->second, &outBounds); + depthSortItems(renderContext, _frontToBack, inItems, outItems->second, &bounds); + if (!outBounds.isNull()) { + outBounds += bounds; + } else { + outBounds = bounds; + } } }