Skip to content

Commit 269a373

Browse files
committed
Fixed traversal bug when skipLevelOfDetail is false
1 parent e80757a commit 269a373

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Change Log
1919
* Fixed a 3D Tiles point cloud bug causing a stray point to appear at the center of the screen on certain hardware. [#5599](https://github.com/AnalyticalGraphicsInc/cesium/issues/5599)
2020
* Fixed removing multiple event listeners within event callbacks. [#5827](https://github.com/AnalyticalGraphicsInc/cesium/issues/5827)
2121
* Running `buildApps` now creates a built version of Sandcastle which uses the built version of Cesium for better performance.
22+
* Fixed a tileset traversal bug when the `skipLevelOfDetail` optimization is off.
2223

2324
### 1.37 - 2017-09-01
2425

Source/Scene/Cesium3DTilesetTraversal.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ define([
509509
if (!tile.hasTilesetContent) {
510510
if (tile.refine === Cesium3DTileRefine.ADD) {
511511
// Always load additive tiles
512-
loadTile(tileset, tile, this.frameState);
512+
loadTile(tileset, tile, this.frameState, true);
513513
if (hasAdditiveContent(tile)) {
514514
tileset._desiredTiles.push(tile);
515515
}
@@ -635,9 +635,16 @@ define([
635635
}
636636
}
637637

638+
function checkAdditiveVisibility(tileset, tile, frameState) {
639+
if (defined(tile.parent) && (tile.parent.refine === Cesium3DTileRefine.ADD)) {
640+
return isVisibleAndMeetsSSE(tileset, tile, frameState);
641+
}
642+
return true;
643+
}
644+
638645
function loadTile(tileset, tile, frameState, checkVisibility) {
639646
if ((tile.contentUnloaded || tile.contentExpired) && tile._requestedFrame !== frameState.frameNumber) {
640-
if (!checkVisibility || isVisibleAndMeetsSSE(tileset, tile, frameState)) {
647+
if (!checkVisibility || checkAdditiveVisibility(tileset, tile, frameState)) {
641648
tile._requestedFrame = frameState.frameNumber;
642649
tileset._requestedTiles.push(tile);
643650
}

0 commit comments

Comments
 (0)