mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 08:48:53 +02:00
CR feedback
This commit is contained in:
parent
8774cb7ca0
commit
323644d877
1 changed files with 1 additions and 4 deletions
|
@ -1349,13 +1349,10 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
||||||
// 2) Non-leaves who's children would be visible but are beyond our LOD.
|
// 2) Non-leaves who's children would be visible but are beyond our LOD.
|
||||||
bool isLeafOrLOD = childNode->isLeaf();
|
bool isLeafOrLOD = childNode->isLeaf();
|
||||||
if (params.viewFrustum && childNode->isColored() && !childNode->isLeaf()) {
|
if (params.viewFrustum && childNode->isColored() && !childNode->isLeaf()) {
|
||||||
float distanceToNode = distance;
|
|
||||||
int childLevel = childNode->getLevel();
|
int childLevel = childNode->getLevel();
|
||||||
float childBoundary = boundaryDistanceForRenderLevel(childLevel + params.boundaryLevelAdjust);
|
float childBoundary = boundaryDistanceForRenderLevel(childLevel + params.boundaryLevelAdjust);
|
||||||
float grandChildBoundary = boundaryDistanceForRenderLevel(childLevel + 1 + params.boundaryLevelAdjust);
|
float grandChildBoundary = boundaryDistanceForRenderLevel(childLevel + 1 + params.boundaryLevelAdjust);
|
||||||
bool inChildBoundary = (distanceToNode <= childBoundary);
|
isLeafOrLOD = ((distance <= childBoundary) && !(distance <= grandChildBoundary));
|
||||||
bool inGrandChildBoundary = (distanceToNode <= grandChildBoundary);
|
|
||||||
isLeafOrLOD = (inChildBoundary && !inGrandChildBoundary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// track children with actual color, only if the child wasn't previously in view!
|
// track children with actual color, only if the child wasn't previously in view!
|
||||||
|
|
Loading…
Reference in a new issue