-
Notifications
You must be signed in to change notification settings - Fork 123
Description
Something wrong with terrain tessellation.
Each time, when terrain level of details changed by user, BasicTessellator adds some top level tiles to current tiles collection by mistake and cause situation, when BasicTerrain contains wrong Sector value (e.g. half globe -90 to 90, even if you are looking on a small terrain part from small altitude). This situation disappears after all detailed tiles become loaded and than top level tiles start to be ignored.
Wrong sector value cause to render useless drawables, which are based on terrain sector clipping.
WWJ version does not have this issue and always return correct dc.getViewingSector size. But WWA returns -90 to 90 degree sector on every details change.
To reproduce this place break point in BasicTessellator loop on top level tiles:
// Subdivide the top level tiles until the desired resolution is achieved in each part of the scene.
for (int idx = 0, len = this.topLevelTiles.size(); idx < len; idx++) {
this.addTileOrDescendants(rc, (TerrainTile) this.topLevelTiles.get(idx));
}
and check what tiles to be added into collection.
You will find that sometimes condition tile.mustSubdivide(rc, this.detailControl) for several top level tiles return false and this tile is added to the tile list together with detailed tiles subdivided from other top level tiles. This top level tile will union with terrain Sector and override its values by -90 to 90 degrees even if you are looking very close to the ground.