Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Tileset Traversal #5254

Merged
merged 23 commits into from
May 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d53e065
initial work to load base sse first
austinEng Apr 26, 2017
53da697
refactor traversal
austinEng Apr 26, 2017
ecb1d70
skip after base traversal completed
austinEng Apr 27, 2017
4d640ae
set base error to max error when skip LODs is disabled; add flags to …
austinEng Apr 27, 2017
815628c
remove double visits
austinEng Apr 27, 2017
c714501
fix selection for additive refinement
austinEng Apr 27, 2017
85ff19c
bugfixes and update tests
austinEng Apr 28, 2017
eedd70f
cleanup
austinEng Apr 28, 2017
6b61a4a
Merge remote-tracking branch 'agi/3d-tiles' into improved-tile-loading
austinEng Apr 28, 2017
4d976f9
unused flags
austinEng Apr 28, 2017
a9786fb
update sort for load
austinEng Apr 28, 2017
0e6b512
updates; wait for nearest descendents to load before refining for bas…
austinEng May 2, 2017
67964c0
add children union culling optimization
austinEng May 2, 2017
2b858d6
bugfixes
austinEng May 2, 2017
50ec7c8
fix root of tileset of tilesets
austinEng May 3, 2017
1170c92
test fixes and avoid adding twice to _desiredTiles
austinEng May 4, 2017
f6853ab
Merge remote-tracking branch 'agi/3d-tiles' into improved-tile-loading
austinEng May 4, 2017
82570f1
do not put translucent commands in CESIUM_3D_TILE render pass
austinEng May 4, 2017
1326d5b
use ManagedArray for temporary BFS front
austinEng May 4, 2017
80806ea
optimizations
austinEng May 4, 2017
538ab35
backface commands for all tiles, not just unresolved tiles. fixes bug…
austinEng May 5, 2017
3bd95ab
updates
austinEng May 5, 2017
b653d6c
Merge remote-tracking branch 'agi/3d-tiles' into improved-tile-loading
austinEng May 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Source/Scene/Cesium3DTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,20 @@ define([
*/
this._optimChildrenWithinParent = Cesium3DTileOptimizationHint.NOT_COMPUTED;

this._sse = 0;
this._screenSpaceError = 0;
this._screenSpaceErrorComputedFrame = -1;
this._finalResolution = true;
this._requestHeap = undefined;
this._depth = 0;
this._centerZDepth = 0;
this._stackLength = 0;
this._selectedFrame = -1;
this._selectionDepth = 0;
this._lastFinalResolution = undefined;
this._lastSelectionDepth = undefined;
this._requestedFrame = undefined;
this._lastVisitedFrame = undefined;
this._ancestorWithContent = undefined;
this._ancestorWithLoadedContent = undefined;
}

defineProperties(Cesium3DTile.prototype, {
Expand Down
15 changes: 9 additions & 6 deletions Source/Scene/Cesium3DTileBatchTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1261,13 +1261,13 @@ define([
derivedCommands.front = deriveTranslucentCommand(command, CullFace.BACK);
}

var bivariateVisibilityTest = tileset._hasMixedContent && this.context.stencilBuffer;
var bivariateVisibilityTest = tileset.skipLODs && tileset._hasMixedContent && this.context.stencilBuffer;

if (bivariateVisibilityTest) {
if (!tile._finalResolution) {
if (!defined(derivedCommands.zback)) {
derivedCommands.zback = deriveZBackfaceCommand(command);
}
if (!defined(derivedCommands.zback)) {
derivedCommands.zback = deriveZBackfaceCommand(command);
}
if (command.pass !== Pass.TRANSLUCENT) {
tileset._backfaceCommands.push(derivedCommands.zback);
}

Expand Down Expand Up @@ -1340,13 +1340,16 @@ define([

function deriveCommand(command) {
var derivedCommand = DrawCommand.shallowClone(command);
derivedCommand.pass = Pass.CESIUM_3D_TILE;

// Add a uniform to indicate if the original command was translucent so
// the shader knows not to cull vertices that were originally transparent
// even though their style is opaque.
var translucentCommand = (derivedCommand.pass === Pass.TRANSLUCENT);

if (!translucentCommand) {
derivedCommand.pass = Pass.CESIUM_3D_TILE;
}

derivedCommand.uniformMap = defined(derivedCommand.uniformMap) ? derivedCommand.uniformMap : {};
derivedCommand.uniformMap.tile_translucentCommand = function() {
return translucentCommand;
Expand Down
Loading