File tree 2 files changed +5
-12
lines changed
2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -50,23 +50,15 @@ define([
50
50
}
51
51
52
52
var depthQuadScratch = FeatureDetection . supportsTypedArrays ( ) ? new Float32Array ( 12 ) : [ ] ;
53
- var scratchRadii = new Cartesian3 ( ) ;
54
53
var scratchCartesian1 = new Cartesian3 ( ) ;
55
54
var scratchCartesian2 = new Cartesian3 ( ) ;
56
55
var scratchCartesian3 = new Cartesian3 ( ) ;
57
56
var scratchCartesian4 = new Cartesian3 ( ) ;
58
57
59
58
function computeDepthQuad ( ellipsoid , frameState ) {
60
- var radii = Cartesian3 . clone ( ellipsoid . radii , scratchRadii ) ;
59
+ var radii = ellipsoid . radii ;
61
60
var p = frameState . camera . positionWC ;
62
61
63
- // Where did this magical number come from? It's how far a GroundPrimitive will be extruded below the surface
64
- // of the Earth. This effectively pushes the depth plane farther from the camera so that classifications on
65
- // 3D Tiles do not intersect the depth plane. This can be removed when depth testing is enabled by default.
66
- radii . x -= 11000.0 ;
67
- radii . y -= 11000.0 ;
68
- radii . z -= 11000.0 ;
69
-
70
62
// Find the corresponding position in the scaled space of the ellipsoid.
71
63
var q = Cartesian3 . multiplyComponents ( ellipsoid . oneOverRadii , p , scratchCartesian1 ) ;
72
64
Original file line number Diff line number Diff line change @@ -1945,9 +1945,6 @@ define([
1945
1945
1946
1946
if ( clearGlobeDepth ) {
1947
1947
clearDepth . execute ( context , passState ) ;
1948
- if ( useDepthPlane ) {
1949
- depthPlane . execute ( context , passState ) ;
1950
- }
1951
1948
}
1952
1949
1953
1950
us . updatePass ( Pass . CESIUM_3D_TILE ) ;
@@ -1968,6 +1965,10 @@ define([
1968
1965
executeCommand ( commands [ j ] , scene , context , passState ) ;
1969
1966
}
1970
1967
1968
+ if ( clearGlobeDepth && useDepthPlane ) {
1969
+ depthPlane . execute ( context , passState ) ;
1970
+ }
1971
+
1971
1972
// Execute commands in order by pass up to the translucent pass.
1972
1973
// Translucent geometry needs special handling (sorting/OIT).
1973
1974
var startPass = Pass . CESIUM_3D_TILE_CLASSIFICATION + 1 ;
You can’t perform that action at this time.
0 commit comments