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 @@ -51,23 +51,15 @@ define([
51
51
}
52
52
53
53
var depthQuadScratch = FeatureDetection . supportsTypedArrays ( ) ? new Float32Array ( 12 ) : [ ] ;
54
- var scratchRadii = new Cartesian3 ( ) ;
55
54
var scratchCartesian1 = new Cartesian3 ( ) ;
56
55
var scratchCartesian2 = new Cartesian3 ( ) ;
57
56
var scratchCartesian3 = new Cartesian3 ( ) ;
58
57
var scratchCartesian4 = new Cartesian3 ( ) ;
59
58
60
59
function computeDepthQuad ( ellipsoid , frameState ) {
61
- var radii = Cartesian3 . clone ( ellipsoid . radii , scratchRadii ) ;
60
+ var radii = ellipsoid . radii ;
62
61
var p = frameState . camera . positionWC ;
63
62
64
- // Where did this magical number come from? It's how far a GroundPrimitive will be extruded below the surface
65
- // of the Earth. This effectively pushes the depth plane farther from the camera so that classifications on
66
- // 3D Tiles do not intersect the depth plane. This can be removed when depth testing is enabled by default.
67
- radii . x -= 11000.0 ;
68
- radii . y -= 11000.0 ;
69
- radii . z -= 11000.0 ;
70
-
71
63
// Find the corresponding position in the scaled space of the ellipsoid.
72
64
var q = Cartesian3 . multiplyComponents ( ellipsoid . oneOverRadii , p , scratchCartesian1 ) ;
73
65
Original file line number Diff line number Diff line change @@ -2315,9 +2315,6 @@ define([
2315
2315
2316
2316
if ( clearGlobeDepth ) {
2317
2317
clearDepth . execute ( context , passState ) ;
2318
- if ( useDepthPlane ) {
2319
- depthPlane . execute ( context , passState ) ;
2320
- }
2321
2318
}
2322
2319
2323
2320
if ( ! environmentState . useInvertClassification || picking ) {
@@ -2435,6 +2432,10 @@ define([
2435
2432
scene . _stencilClearCommand . execute ( context , passState ) ;
2436
2433
}
2437
2434
2435
+ if ( clearGlobeDepth && useDepthPlane ) {
2436
+ depthPlane . execute ( context , passState ) ;
2437
+ }
2438
+
2438
2439
us . updatePass ( Pass . OPAQUE ) ;
2439
2440
commands = frustumCommands . commands [ Pass . OPAQUE ] ;
2440
2441
length = frustumCommands . indices [ Pass . OPAQUE ] ;
You can’t perform that action at this time.
0 commit comments