You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Extra manual depth testing is done to allow more control over how a billboard is occluded
135
+
// by the globe when near and far from the camera.
136
+
void doDepthTest(float globeDepth) {
135
137
float temp = v_compressed.y;
136
138
temp = temp * SHIFT_RIGHT1;
137
139
float temp2 = (temp -floor(temp)) * SHIFT_LEFT1;
@@ -156,14 +158,10 @@ void doDepthTest() {
156
158
}
157
159
#endif
158
160
159
-
// Automatic depth testing of billboards is disabled (@see BillboardCollection#update).
160
-
// Instead, we do one of two types of manual depth tests (potentially in addition to the test above), depending on the camera's distance to the billboard fragment.
161
161
// If we're far away, we just compare against a flat, camera-facing depth-plane at the ellipsoid's center.
162
162
// If we're close, we compare against the globe depth texture (which includes depth from the 3D tile pass).
163
-
vec2 fragSt =gl_FragCoord.xy / czm_viewport.zw;
164
-
float globeDepth = getGlobeDepthAtCoords(fragSt);
165
-
if (globeDepth ==0.0) return; // Not on globe
166
-
163
+
164
+
if (globeDepth ==0.0) return; // Not on globe
167
165
float distanceToEllipsoidCenter =-length(czm_viewerPositionWC); // depth is negative by convention
0 commit comments