File tree 4 files changed +17
-3
lines changed
4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ Change Log
4
4
### 1.65.0 - 2019-01-02
5
5
6
6
##### Fixes :wrench :
7
- * Fix Geocoder auto-complete suggestions when hosted inside Web Components. [ #8425 ] ( https://github.com/AnalyticalGraphicsInc/cesium/pull/8425 )
7
+ * Fixed Geocoder auto-complete suggestions when hosted inside Web Components. [ #8425 ] ( https://github.com/AnalyticalGraphicsInc/cesium/pull/8425 )
8
+ * Fixed primitive culling when below the ellipsoid but above terrain. [ #8398 ] ( https://github.com/AnalyticalGraphicsInc/cesium/pull/8398 )
8
9
9
10
### 1.64.0 - 2019-12-02
10
11
Original file line number Diff line number Diff line change @@ -391,6 +391,14 @@ import SceneMode from './SceneMode.js';
391
391
* @type {Cesium3DTilePassState }
392
392
*/
393
393
this . tilesetPassState = undefined ;
394
+
395
+ /**
396
+ * The minimum terrain height out of all rendered terrain tiles. Used to improve culling for objects underneath the ellipsoid but above terrain.
397
+ *
398
+ * @type {Number }
399
+ * @default 0.0
400
+ */
401
+ this . minimumTerrainHeight = 0.0 ;
394
402
}
395
403
396
404
/**
Original file line number Diff line number Diff line change @@ -420,7 +420,10 @@ import TileSelectionResult from './TileSelectionResult.js';
420
420
}
421
421
422
422
for ( var tileIndex = 0 , tileLength = tilesToRender . length ; tileIndex < tileLength ; ++ tileIndex ) {
423
- addDrawCommandsForTile ( this , tilesToRender [ tileIndex ] , frameState ) ;
423
+ var tile = tilesToRender [ tileIndex ] ;
424
+ var tileBoundingRegion = tile . data . tileBoundingRegion ;
425
+ addDrawCommandsForTile ( this , tile , frameState ) ;
426
+ frameState . minimumTerrainHeight = Math . min ( frameState . minimumTerrainHeight , tileBoundingRegion . minimumHeight ) ;
424
427
}
425
428
}
426
429
} ;
Original file line number Diff line number Diff line change @@ -1711,7 +1711,8 @@ import View from './View.js';
1711
1711
var globe = scene . globe ;
1712
1712
if ( scene . _mode === SceneMode . SCENE3D && defined ( globe ) && globe . show ) {
1713
1713
var ellipsoid = globe . ellipsoid ;
1714
- scratchOccluderBoundingSphere . radius = ellipsoid . minimumRadius ;
1714
+ var minimumTerrainHeight = scene . frameState . minimumTerrainHeight ;
1715
+ scratchOccluderBoundingSphere . radius = ellipsoid . minimumRadius + minimumTerrainHeight ;
1715
1716
scratchOccluder = Occluder . fromBoundingSphere ( scratchOccluderBoundingSphere , scene . camera . positionWC , scratchOccluder ) ;
1716
1717
return scratchOccluder ;
1717
1718
}
@@ -1754,6 +1755,7 @@ import View from './View.js';
1754
1755
frameState . cullingVolume = camera . frustum . computeCullingVolume ( camera . positionWC , camera . directionWC , camera . upWC ) ;
1755
1756
frameState . occluder = getOccluder ( this ) ;
1756
1757
frameState . terrainExaggeration = this . _terrainExaggeration ;
1758
+ frameState . minimumTerrainHeight = 0.0 ;
1757
1759
frameState . minimumDisableDepthTestDistance = this . _minimumDisableDepthTestDistance ;
1758
1760
frameState . invertClassification = this . invertClassification ;
1759
1761
frameState . useLogDepth = this . _logDepthBuffer && ! ( this . camera . frustum instanceof OrthographicFrustum || this . camera . frustum instanceof OrthographicOffCenterFrustum ) ;
You can’t perform that action at this time.
0 commit comments