mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-16 18:58:29 +02:00
only get boundary distance once, since its the same for all grandchildren
This commit is contained in:
parent
09f77279e2
commit
3c150c3ec6
1 changed files with 1 additions and 1 deletions
|
@ -1351,6 +1351,7 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
|||
if (params.viewFrustum && childNode->isColored() && !childNode->isLeaf()) {
|
||||
int grandChildrenInView = 0;
|
||||
int grandChildrenInLOD = 0;
|
||||
float grandChildBoundaryDistance = boundaryDistanceForRenderLevel(childNode->getLevel() + 2);
|
||||
for (int grandChildIndex = 0; grandChildIndex < NUMBER_OF_CHILDREN; grandChildIndex++) {
|
||||
VoxelNode* grandChild = childNode->getChildAtIndex(grandChildIndex);
|
||||
|
||||
|
@ -1358,7 +1359,6 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
|||
grandChildrenInView++;
|
||||
|
||||
float grandChildDistance = grandChild->distanceToCamera(*params.viewFrustum);
|
||||
float grandChildBoundaryDistance = boundaryDistanceForRenderLevel(grandChild->getLevel() + 1);
|
||||
if (grandChildDistance < grandChildBoundaryDistance) {
|
||||
grandChildrenInLOD++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue