@cesium/engine 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{chunk-IQCBK4CE.js → chunk-3PW6ZBN4.js} +8 -304
- package/Build/Workers/{chunk-U5O26DDO.js → chunk-434ZTTFX.js} +2 -2
- package/Build/Workers/{chunk-DNCKFFNR.js → chunk-4KP73B43.js} +3 -3
- package/Build/Workers/{chunk-TIEL2RYB.js → chunk-52VSIKEA.js} +16 -16
- package/Build/Workers/{chunk-6JRDO2JP.js → chunk-5GDBZTHX.js} +18 -18
- package/Build/Workers/{chunk-WYMW5NZB.js → chunk-5HLGKKG3.js} +2 -2
- package/Build/Workers/{chunk-R5NOUYKW.js → chunk-5IRLXUTA.js} +7 -7
- package/Build/Workers/{chunk-4EXWKTY2.js → chunk-5SK36PU4.js} +8 -8
- package/Build/Workers/{chunk-UJ76JVUZ.js → chunk-ARPTYYKS.js} +5 -5
- package/Build/Workers/{chunk-2GWOHAWL.js → chunk-ATB2I7OS.js} +4 -4
- package/Build/Workers/{chunk-6LG4PY2M.js → chunk-AXFRNOVC.js} +12 -12
- package/Build/Workers/{chunk-A3TYRSRJ.js → chunk-BP467WX3.js} +4 -4
- package/Build/Workers/{chunk-I5XKU3UZ.js → chunk-BUZDZBUH.js} +11 -13
- package/Build/Workers/{chunk-N3OQDJDV.js → chunk-CDGHUKQ4.js} +13 -13
- package/Build/Workers/{chunk-7ISAYW2A.js → chunk-CSIZ3BGT.js} +15 -17
- package/Build/Workers/{chunk-N73NY3KY.js → chunk-CWJQGBWT.js} +1 -1
- package/Build/Workers/{chunk-E5HIGWSZ.js → chunk-DMCSY5BU.js} +5 -5
- package/Build/Workers/{chunk-JY6WB2NK.js → chunk-DR5XZ6K5.js} +13 -13
- package/Build/Workers/{chunk-4MPXTOW6.js → chunk-FWGNCYP6.js} +7 -7
- package/Build/Workers/{chunk-LID3UUML.js → chunk-GF5TNNKP.js} +6 -6
- package/Build/Workers/{chunk-ULABUYF6.js → chunk-GVL5I7TC.js} +18 -20
- package/Build/Workers/{chunk-4JETNOH2.js → chunk-H5DUXHCV.js} +11 -11
- package/Build/Workers/{chunk-QX5ASOZZ.js → chunk-HFKSAB5K.js} +14 -16
- package/Build/Workers/{chunk-XKGSTUQO.js → chunk-HOT2SNXP.js} +15 -20
- package/Build/Workers/{chunk-ICD3BWBC.js → chunk-HPH5HSFE.js} +2 -2
- package/Build/Workers/{chunk-FNHGOHCI.js → chunk-HPP4JLNH.js} +8 -8
- package/Build/Workers/{chunk-HX5XY3NH.js → chunk-HUPNRBWW.js} +6 -6
- package/Build/Workers/{chunk-EEL3YC6V.js → chunk-JGG36SQV.js} +4 -4
- package/Build/Workers/{chunk-54GSYZWT.js → chunk-LGJUI2CE.js} +325 -5
- package/Build/Workers/{chunk-PNAD2XAN.js → chunk-LGL4P5KL.js} +6 -6
- package/Build/Workers/{chunk-CKOGHQ6J.js → chunk-LX6XV4DK.js} +5 -5
- package/Build/Workers/{chunk-ZERWARDV.js → chunk-MN34FIF5.js} +1 -1
- package/Build/Workers/{chunk-MMNPUV23.js → chunk-MW3CJYLX.js} +2 -2
- package/Build/Workers/{chunk-KFCTEEBD.js → chunk-NE4JNU6H.js} +31 -21
- package/Build/Workers/{chunk-DHO4HQHW.js → chunk-O43GWBSF.js} +1 -1
- package/Build/Workers/{chunk-EH2PEDWL.js → chunk-PIXK6KHB.js} +2 -2
- package/Build/Workers/{chunk-TDVU7NH7.js → chunk-PZ2WJWUG.js} +6 -6
- package/Build/Workers/{chunk-AEADHPUM.js → chunk-QRBRVGZC.js} +4 -4
- package/Build/Workers/{chunk-VIAGIVGP.js → chunk-QTZQZY2C.js} +9 -9
- package/Build/Workers/{chunk-3R5RPSYS.js → chunk-R3HUGXBH.js} +9 -9
- package/Build/Workers/{chunk-IDAL54EF.js → chunk-R4OZKBXH.js} +6 -6
- package/Build/Workers/{chunk-CHGQXPF3.js → chunk-RH4N2ONY.js} +7 -7
- package/Build/Workers/{chunk-YK5RU5AO.js → chunk-RIDPF7PO.js} +2 -2
- package/Build/Workers/{chunk-CZFGXAMG.js → chunk-SNN7WOC2.js} +13 -13
- package/Build/Workers/{chunk-F66GYWDZ.js → chunk-SQVTYRZY.js} +5 -7
- package/Build/Workers/{chunk-XNRYWRVT.js → chunk-SV7DDPAC.js} +1 -1
- package/Build/Workers/{chunk-P2BTKBVY.js → chunk-TIXXVKUY.js} +11 -11
- package/Build/Workers/{chunk-AI2FOC47.js → chunk-TMPVBFJQ.js} +11 -11
- package/Build/Workers/{chunk-4CHSBZNO.js → chunk-XUTVA4K5.js} +11 -11
- package/Build/Workers/{chunk-DD2PDL6D.js → chunk-Y4OJ4B23.js} +5 -5
- package/Build/Workers/{chunk-FMN2NHBU.js → chunk-YBKFS53K.js} +1 -1
- package/Build/Workers/{chunk-BLXANKPB.js → chunk-Z2SIPUKB.js} +6 -6
- package/Build/Workers/{chunk-5HUDPV54.js → chunk-Z4JUBRHP.js} +6 -6
- package/Build/Workers/{chunk-N7FIYNQV.js → chunk-ZQRZBHYI.js} +4 -4
- package/Build/Workers/combineGeometry.js +23 -23
- package/Build/Workers/createBoxGeometry.js +17 -17
- package/Build/Workers/createBoxOutlineGeometry.js +15 -15
- package/Build/Workers/createCircleGeometry.js +25 -25
- package/Build/Workers/createCircleOutlineGeometry.js +18 -18
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -34
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +19 -19
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -19
- package/Build/Workers/createEllipseGeometry.js +25 -25
- package/Build/Workers/createEllipseOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipsoidGeometry.js +18 -18
- package/Build/Workers/createEllipsoidOutlineGeometry.js +17 -17
- package/Build/Workers/createFrustumGeometry.js +17 -17
- package/Build/Workers/createFrustumOutlineGeometry.js +17 -17
- package/Build/Workers/createGeometry.js +23 -23
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +15 -15
- package/Build/Workers/createPlaneOutlineGeometry.js +14 -14
- package/Build/Workers/createPolygonGeometry.js +34 -34
- package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createPolylineGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +32 -33
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +28 -29
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +21 -23
- package/Build/Workers/createSimplePolylineGeometry.js +22 -22
- package/Build/Workers/createSphereGeometry.js +18 -18
- package/Build/Workers/createSphereOutlineGeometry.js +17 -17
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +23 -23
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +21 -21
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -19
- package/Build/Workers/createWallGeometry.js +23 -23
- package/Build/Workers/createWallOutlineGeometry.js +22 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +9 -9
- package/Build/Workers/transcodeKTX2.js +9 -9
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Source/Core/CesiumTerrainProvider.js +11 -4
- package/Source/Core/Ellipsoid.js +45 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Quaternion.js +6 -2
- package/Source/Core/RectangleOutlineGeometry.js +2 -4
- package/Source/Core/RequestScheduler.js +3 -9
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/VerticalExaggeration.js +69 -0
- package/Source/Renderer/AutomaticUniforms.js +53 -0
- package/Source/Renderer/UniformState.js +119 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Cesium3DTile.js +122 -10
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/FrameState.js +4 -4
- package/Source/Scene/Globe.js +66 -19
- package/Source/Scene/GlobeSurfaceTile.js +4 -4
- package/Source/Scene/GlobeSurfaceTileProvider.js +21 -21
- package/Source/Scene/GroundPrimitive.js +5 -5
- package/Source/Scene/ImageryLayer.js +3 -3
- package/Source/Scene/IonImageryProvider.js +1 -1
- package/Source/Scene/MapboxImageryProvider.js +2 -2
- package/Source/Scene/Megatexture.js +1 -1
- package/Source/Scene/Model/Model.js +11 -0
- package/Source/Scene/Model/ModelRuntimePrimitive.js +6 -0
- package/Source/Scene/Model/VerticalExaggerationPipelineStage.js +60 -0
- package/Source/Scene/Scene.js +28 -3
- package/Source/Scene/ScreenSpaceCameraController.js +12 -19
- package/Source/Scene/TerrainFillMesh.js +2 -2
- package/Source/Scene/TileOrientedBoundingBox.js +1 -1
- package/Source/Scene/VoxelPrimitive.js +73 -2
- package/Source/Shaders/GlobeVS.glsl +3 -3
- package/Source/Shaders/GlobeVS.js +3 -3
- package/Source/Shaders/Model/ModelVS.glsl +4 -0
- package/Source/Shaders/Model/ModelVS.js +4 -0
- package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +39 -0
- package/Source/Shaders/Model/VerticalExaggerationStageVS.js +41 -0
- package/index.d.ts +39 -22
- package/index.js +590 -588
- package/package.json +2 -2
- package/Source/Core/TerrainExaggeration.js +0 -49
|
@@ -25,7 +25,7 @@ import OrthographicFrustum from "../Core/OrthographicFrustum.js";
|
|
|
25
25
|
import PrimitiveType from "../Core/PrimitiveType.js";
|
|
26
26
|
import Rectangle from "../Core/Rectangle.js";
|
|
27
27
|
import SphereOutlineGeometry from "../Core/SphereOutlineGeometry.js";
|
|
28
|
-
import
|
|
28
|
+
import VerticalExaggeration from "../Core/VerticalExaggeration.js";
|
|
29
29
|
import TerrainQuantization from "../Core/TerrainQuantization.js";
|
|
30
30
|
import Visibility from "../Core/Visibility.js";
|
|
31
31
|
import WebMercatorProjection from "../Core/WebMercatorProjection.js";
|
|
@@ -179,8 +179,8 @@ function GlobeSurfaceTileProvider(options) {
|
|
|
179
179
|
this._hasLoadedTilesThisFrame = false;
|
|
180
180
|
this._hasFillTilesThisFrame = false;
|
|
181
181
|
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
182
|
+
this._oldVerticalExaggeration = undefined;
|
|
183
|
+
this._oldVerticalExaggerationRelativeHeight = undefined;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
Object.defineProperties(GlobeSurfaceTileProvider.prototype, {
|
|
@@ -448,7 +448,7 @@ GlobeSurfaceTileProvider.prototype.endUpdate = function (frameState) {
|
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
// When
|
|
451
|
+
// When vertical exaggeration changes, all of the loaded tiles need to generate
|
|
452
452
|
// geodetic surface normals so they can scale properly when rendered.
|
|
453
453
|
// When exaggeration is reset, geodetic surface normals are removed to decrease
|
|
454
454
|
// memory usage. Some tiles might have been constructed with the correct
|
|
@@ -460,16 +460,16 @@ GlobeSurfaceTileProvider.prototype.endUpdate = function (frameState) {
|
|
|
460
460
|
// exaggeration changes.
|
|
461
461
|
|
|
462
462
|
const quadtree = this.quadtree;
|
|
463
|
-
const exaggeration = frameState.
|
|
463
|
+
const exaggeration = frameState.verticalExaggeration;
|
|
464
464
|
const exaggerationRelativeHeight =
|
|
465
|
-
frameState.
|
|
465
|
+
frameState.verticalExaggerationRelativeHeight;
|
|
466
466
|
const exaggerationChanged =
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
467
|
+
this._oldVerticalExaggeration !== exaggeration ||
|
|
468
|
+
this._oldVerticalExaggerationRelativeHeight !== exaggerationRelativeHeight;
|
|
469
469
|
|
|
470
470
|
// Keep track of the next time there is a change in exaggeration
|
|
471
|
-
this.
|
|
472
|
-
this.
|
|
471
|
+
this._oldVerticalExaggeration = exaggeration;
|
|
472
|
+
this._oldVerticalExaggerationRelativeHeight = exaggerationRelativeHeight;
|
|
473
473
|
|
|
474
474
|
if (exaggerationChanged) {
|
|
475
475
|
quadtree.forEachLoadedTile(function (tile) {
|
|
@@ -1258,18 +1258,18 @@ function updateTileBoundingRegion(tile, tileProvider, frameState) {
|
|
|
1258
1258
|
|
|
1259
1259
|
// Update bounding regions from the min and max heights
|
|
1260
1260
|
if (sourceTile !== undefined) {
|
|
1261
|
-
const exaggeration = frameState.
|
|
1261
|
+
const exaggeration = frameState.verticalExaggeration;
|
|
1262
1262
|
const exaggerationRelativeHeight =
|
|
1263
|
-
frameState.
|
|
1263
|
+
frameState.verticalExaggerationRelativeHeight;
|
|
1264
1264
|
const hasExaggeration = exaggeration !== 1.0;
|
|
1265
1265
|
if (hasExaggeration) {
|
|
1266
1266
|
hasBoundingVolumesFromMesh = false;
|
|
1267
|
-
tileBoundingRegion.minimumHeight =
|
|
1267
|
+
tileBoundingRegion.minimumHeight = VerticalExaggeration.getHeight(
|
|
1268
1268
|
tileBoundingRegion.minimumHeight,
|
|
1269
1269
|
exaggeration,
|
|
1270
1270
|
exaggerationRelativeHeight
|
|
1271
1271
|
);
|
|
1272
|
-
tileBoundingRegion.maximumHeight =
|
|
1272
|
+
tileBoundingRegion.maximumHeight = VerticalExaggeration.getHeight(
|
|
1273
1273
|
tileBoundingRegion.maximumHeight,
|
|
1274
1274
|
exaggeration,
|
|
1275
1275
|
exaggerationRelativeHeight
|
|
@@ -1625,8 +1625,8 @@ function createTileUniformMap(frameState, globeSurfaceTileProvider) {
|
|
|
1625
1625
|
u_center3D: function () {
|
|
1626
1626
|
return this.properties.center3D;
|
|
1627
1627
|
},
|
|
1628
|
-
|
|
1629
|
-
return this.properties.
|
|
1628
|
+
u_verticalExaggerationAndRelativeHeight: function () {
|
|
1629
|
+
return this.properties.verticalExaggerationAndRelativeHeight;
|
|
1630
1630
|
},
|
|
1631
1631
|
u_tileRectangle: function () {
|
|
1632
1632
|
return this.properties.tileRectangle;
|
|
@@ -1808,7 +1808,7 @@ function createTileUniformMap(frameState, globeSurfaceTileProvider) {
|
|
|
1808
1808
|
modifiedModelView: new Matrix4(),
|
|
1809
1809
|
tileRectangle: new Cartesian4(),
|
|
1810
1810
|
|
|
1811
|
-
|
|
1811
|
+
verticalExaggerationAndRelativeHeight: new Cartesian2(1.0, 0.0),
|
|
1812
1812
|
|
|
1813
1813
|
dayTextures: [],
|
|
1814
1814
|
dayTextureTranslationAndScale: [],
|
|
@@ -2174,9 +2174,9 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2174
2174
|
const encoding = mesh.encoding;
|
|
2175
2175
|
const tileBoundingRegion = surfaceTile.tileBoundingRegion;
|
|
2176
2176
|
|
|
2177
|
-
const exaggeration = frameState.
|
|
2177
|
+
const exaggeration = frameState.verticalExaggeration;
|
|
2178
2178
|
const exaggerationRelativeHeight =
|
|
2179
|
-
frameState.
|
|
2179
|
+
frameState.verticalExaggerationRelativeHeight;
|
|
2180
2180
|
const hasExaggeration = exaggeration !== 1.0;
|
|
2181
2181
|
const hasGeodeticSurfaceNormals = encoding.hasGeodeticSurfaceNormals;
|
|
2182
2182
|
|
|
@@ -2431,8 +2431,8 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2431
2431
|
);
|
|
2432
2432
|
}
|
|
2433
2433
|
|
|
2434
|
-
uniformMapProperties.
|
|
2435
|
-
uniformMapProperties.
|
|
2434
|
+
uniformMapProperties.verticalExaggerationAndRelativeHeight.x = exaggeration;
|
|
2435
|
+
uniformMapProperties.verticalExaggerationAndRelativeHeight.y = exaggerationRelativeHeight;
|
|
2436
2436
|
|
|
2437
2437
|
uniformMapProperties.center3D = mesh.center;
|
|
2438
2438
|
Cartesian3.clone(rtc, uniformMapProperties.rtc);
|
|
@@ -10,7 +10,7 @@ import DeveloperError from "../Core/DeveloperError.js";
|
|
|
10
10
|
import GeometryInstance from "../Core/GeometryInstance.js";
|
|
11
11
|
import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
|
|
12
12
|
import Rectangle from "../Core/Rectangle.js";
|
|
13
|
-
import
|
|
13
|
+
import VerticalExaggeration from "../Core/VerticalExaggeration.js";
|
|
14
14
|
import ClassificationPrimitive from "./ClassificationPrimitive.js";
|
|
15
15
|
import ClassificationType from "./ClassificationType.js";
|
|
16
16
|
import PerInstanceColorAppearance from "./PerInstanceColorAppearance.js";
|
|
@@ -763,15 +763,15 @@ GroundPrimitive.prototype.update = function (frameState) {
|
|
|
763
763
|
|
|
764
764
|
// Now compute the min/max heights for the primitive
|
|
765
765
|
setMinMaxTerrainHeights(this, rectangle, ellipsoid);
|
|
766
|
-
const exaggeration = frameState.
|
|
766
|
+
const exaggeration = frameState.verticalExaggeration;
|
|
767
767
|
const exaggerationRelativeHeight =
|
|
768
|
-
frameState.
|
|
769
|
-
this._minHeight =
|
|
768
|
+
frameState.verticalExaggerationRelativeHeight;
|
|
769
|
+
this._minHeight = VerticalExaggeration.getHeight(
|
|
770
770
|
this._minTerrainHeight,
|
|
771
771
|
exaggeration,
|
|
772
772
|
exaggerationRelativeHeight
|
|
773
773
|
);
|
|
774
|
-
this._maxHeight =
|
|
774
|
+
this._maxHeight = VerticalExaggeration.getHeight(
|
|
775
775
|
this._maxTerrainHeight,
|
|
776
776
|
exaggeration,
|
|
777
777
|
exaggerationRelativeHeight
|
|
@@ -132,8 +132,8 @@ import TileImagery from "./TileImagery.js";
|
|
|
132
132
|
* @alias ImageryLayer
|
|
133
133
|
* @constructor
|
|
134
134
|
*
|
|
135
|
-
* @param {ImageryProvider} imageryProvider The imagery provider to use.
|
|
136
|
-
* @param {ImageryLayer.ConstructorOptions} options An object describing initialization options
|
|
135
|
+
* @param {ImageryProvider} [imageryProvider] The imagery provider to use.
|
|
136
|
+
* @param {ImageryLayer.ConstructorOptions} [options] An object describing initialization options
|
|
137
137
|
*
|
|
138
138
|
* @see ImageryLayer.fromProviderAsync
|
|
139
139
|
* @see ImageryLayer.fromWorldImagery
|
|
@@ -142,7 +142,7 @@ import TileImagery from "./TileImagery.js";
|
|
|
142
142
|
* // Add an OpenStreetMaps layer
|
|
143
143
|
* const imageryLayer = new Cesium.ImageryLayer(new Cesium.OpenStreetMapImageryProvider({
|
|
144
144
|
* url: "https://tile.openstreetmap.org/"
|
|
145
|
-
* }))
|
|
145
|
+
* }));
|
|
146
146
|
* scene.imageryLayers.add(imageryLayer);
|
|
147
147
|
*
|
|
148
148
|
* @example
|
|
@@ -251,7 +251,7 @@ Object.defineProperties(IonImageryProvider.prototype, {
|
|
|
251
251
|
* Creates a provider for tiled imagery using the Cesium ion REST API.
|
|
252
252
|
*
|
|
253
253
|
* @param {Number} assetId An ion imagery asset ID.
|
|
254
|
-
* @param {IonImageryProvider.ConstructorOptions} options Object describing initialization options.
|
|
254
|
+
* @param {IonImageryProvider.ConstructorOptions} [options] Object describing initialization options.
|
|
255
255
|
* @returns {Promise<IonImageryProvider>} A promise which resolves to the created IonImageryProvider.
|
|
256
256
|
*
|
|
257
257
|
* @example
|
|
@@ -43,8 +43,8 @@ const defaultCredit = new Credit(
|
|
|
43
43
|
* accessToken: 'thisIsMyAccessToken'
|
|
44
44
|
* });
|
|
45
45
|
*
|
|
46
|
-
* @see {@link https://
|
|
47
|
-
* @see {@link https://
|
|
46
|
+
* @see {@link https://docs.mapbox.com/api/maps/raster-tiles/}
|
|
47
|
+
* @see {@link https://docs.mapbox.com/api/accounts/tokens/}
|
|
48
48
|
*/
|
|
49
49
|
function MapboxImageryProvider(options) {
|
|
50
50
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
@@ -366,7 +366,7 @@ Megatexture.getApproximateTextureMemoryByteLength = function (
|
|
|
366
366
|
const voxelCountTotal =
|
|
367
367
|
tileCount * dimensions.x * dimensions.y * dimensions.z;
|
|
368
368
|
|
|
369
|
-
const sliceCountPerRegionX = Math.ceil(Math.sqrt(dimensions.
|
|
369
|
+
const sliceCountPerRegionX = Math.ceil(Math.sqrt(dimensions.x));
|
|
370
370
|
const sliceCountPerRegionY = Math.ceil(dimensions.z / sliceCountPerRegionX);
|
|
371
371
|
const voxelCountPerRegionX = sliceCountPerRegionX * dimensions.x;
|
|
372
372
|
const voxelCountPerRegionY = sliceCountPerRegionY * dimensions.y;
|
|
@@ -333,6 +333,8 @@ function Model(options) {
|
|
|
333
333
|
this._heightDirty = this._heightReference !== HeightReference.NONE;
|
|
334
334
|
this._removeUpdateHeightCallback = undefined;
|
|
335
335
|
|
|
336
|
+
this._verticalExaggerationOn = false;
|
|
337
|
+
|
|
336
338
|
this._clampedModelMatrix = undefined; // For use with height reference
|
|
337
339
|
|
|
338
340
|
const scene = options.scene;
|
|
@@ -1789,6 +1791,7 @@ Model.prototype.update = function (frameState) {
|
|
|
1789
1791
|
updateSkipLevelOfDetail(this, frameState);
|
|
1790
1792
|
updateClippingPlanes(this, frameState);
|
|
1791
1793
|
updateSceneMode(this, frameState);
|
|
1794
|
+
updateVerticalExaggeration(this, frameState);
|
|
1792
1795
|
|
|
1793
1796
|
this._defaultTexture = frameState.context.defaultTexture;
|
|
1794
1797
|
|
|
@@ -1983,6 +1986,14 @@ function updateSceneMode(model, frameState) {
|
|
|
1983
1986
|
}
|
|
1984
1987
|
}
|
|
1985
1988
|
|
|
1989
|
+
function updateVerticalExaggeration(model, frameState) {
|
|
1990
|
+
const verticalExaggerationNeeded = frameState.verticalExaggeration !== 1.0;
|
|
1991
|
+
if (model._verticalExaggerationOn !== verticalExaggerationNeeded) {
|
|
1992
|
+
model.resetDrawCommands();
|
|
1993
|
+
model._verticalExaggerationOn = verticalExaggerationNeeded;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1986
1997
|
function buildDrawCommands(model, frameState) {
|
|
1987
1998
|
if (!model._drawCommandsBuilt) {
|
|
1988
1999
|
model.destroyPipelineResources();
|
|
@@ -24,6 +24,7 @@ import PrimitiveStatisticsPipelineStage from "./PrimitiveStatisticsPipelineStage
|
|
|
24
24
|
import SceneMode2DPipelineStage from "./SceneMode2DPipelineStage.js";
|
|
25
25
|
import SelectedFeatureIdPipelineStage from "./SelectedFeatureIdPipelineStage.js";
|
|
26
26
|
import SkinningPipelineStage from "./SkinningPipelineStage.js";
|
|
27
|
+
import VerticalExaggerationPipelineStage from "./VerticalExaggerationPipelineStage.js";
|
|
27
28
|
import WireframePipelineStage from "./WireframePipelineStage.js";
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -198,6 +199,7 @@ ModelRuntimePrimitive.prototype.configurePipeline = function (frameState) {
|
|
|
198
199
|
const mode = frameState.mode;
|
|
199
200
|
const use2D =
|
|
200
201
|
mode !== SceneMode.SCENE3D && !frameState.scene3DOnly && model._projectTo2D;
|
|
202
|
+
const exaggerateTerrain = frameState.verticalExaggeration !== 1.0;
|
|
201
203
|
|
|
202
204
|
const hasMorphTargets =
|
|
203
205
|
defined(primitive.morphTargets) && primitive.morphTargets.length > 0;
|
|
@@ -281,6 +283,10 @@ ModelRuntimePrimitive.prototype.configurePipeline = function (frameState) {
|
|
|
281
283
|
pipelineStages.push(CPUStylingPipelineStage);
|
|
282
284
|
}
|
|
283
285
|
|
|
286
|
+
if (exaggerateTerrain) {
|
|
287
|
+
pipelineStages.push(VerticalExaggerationPipelineStage);
|
|
288
|
+
}
|
|
289
|
+
|
|
284
290
|
if (hasCustomShader) {
|
|
285
291
|
pipelineStages.push(CustomShaderPipelineStage);
|
|
286
292
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Cartesian2 from "../../Core/Cartesian2.js";
|
|
2
|
+
import ShaderDestination from "../../Renderer/ShaderDestination.js";
|
|
3
|
+
import VerticalExaggerationStageVS from "../../Shaders/Model/VerticalExaggerationStageVS.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The custom shader pipeline stage takes GLSL callbacks from the
|
|
7
|
+
* {@link CustomShader} and inserts them into the overall shader code for the
|
|
8
|
+
* {@link Model}. The input to the callback is a struct with many
|
|
9
|
+
* properties that depend on the attributes of the primitive. This shader code
|
|
10
|
+
* is automatically generated by this stage.
|
|
11
|
+
*
|
|
12
|
+
* @namespace VerticalExaggerationPipelineStage
|
|
13
|
+
*
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
const VerticalExaggerationPipelineStage = {
|
|
17
|
+
name: "VerticalExaggerationPipelineStage", // Helps with debugging
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const scratchExaggerationUniform = new Cartesian2();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Add vertical exaggeration to a shader
|
|
24
|
+
*
|
|
25
|
+
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
|
|
26
|
+
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
|
|
27
|
+
* @param {FrameState} frameState The frame state.
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
VerticalExaggerationPipelineStage.process = function (
|
|
31
|
+
renderResources,
|
|
32
|
+
primitive,
|
|
33
|
+
frameState
|
|
34
|
+
) {
|
|
35
|
+
const { shaderBuilder, uniformMap } = renderResources;
|
|
36
|
+
|
|
37
|
+
shaderBuilder.addVertexLines(VerticalExaggerationStageVS);
|
|
38
|
+
|
|
39
|
+
shaderBuilder.addDefine(
|
|
40
|
+
"HAS_VERTICAL_EXAGGERATION",
|
|
41
|
+
undefined,
|
|
42
|
+
ShaderDestination.VERTEX
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
shaderBuilder.addUniform(
|
|
46
|
+
"vec2",
|
|
47
|
+
"u_verticalExaggerationAndRelativeHeight",
|
|
48
|
+
ShaderDestination.VERTEX
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
uniformMap.u_verticalExaggerationAndRelativeHeight = function () {
|
|
52
|
+
return Cartesian2.fromElements(
|
|
53
|
+
frameState.verticalExaggeration,
|
|
54
|
+
frameState.verticalExaggerationRelativeHeight,
|
|
55
|
+
scratchExaggerationUniform
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default VerticalExaggerationPipelineStage;
|
package/Source/Scene/Scene.js
CHANGED
|
@@ -356,6 +356,24 @@ function Scene(options) {
|
|
|
356
356
|
*/
|
|
357
357
|
this.nearToFarDistance2D = 1.75e6;
|
|
358
358
|
|
|
359
|
+
/**
|
|
360
|
+
* The vertical exaggeration of the scene.
|
|
361
|
+
* When set to 1.0, no exaggeration is applied.
|
|
362
|
+
*
|
|
363
|
+
* @type {number}
|
|
364
|
+
* @default 1.0
|
|
365
|
+
*/
|
|
366
|
+
this.verticalExaggeration = 1.0;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* The reference height for vertical exaggeration of the scene.
|
|
370
|
+
* When set to 0.0, the exaggeration is applied relative to the ellipsoid surface.
|
|
371
|
+
*
|
|
372
|
+
* @type {number}
|
|
373
|
+
* @default 0.0
|
|
374
|
+
*/
|
|
375
|
+
this.verticalExaggerationRelativeHeight = 0.0;
|
|
376
|
+
|
|
359
377
|
/**
|
|
360
378
|
* This property is for debugging only; it is not for production use.
|
|
361
379
|
* <p>
|
|
@@ -1880,10 +1898,17 @@ Scene.prototype.updateFrameState = function () {
|
|
|
1880
1898
|
frameState.cameraUnderground = this._cameraUnderground;
|
|
1881
1899
|
frameState.globeTranslucencyState = this._globeTranslucencyState;
|
|
1882
1900
|
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1901
|
+
const { globe } = this;
|
|
1902
|
+
if (defined(globe) && globe._terrainExaggerationChanged) {
|
|
1903
|
+
// Honor a user-set value for the old deprecated globe.terrainExaggeration.
|
|
1904
|
+
// This can be removed when Globe.terrainExaggeration is removed.
|
|
1905
|
+
this.verticalExaggeration = globe._terrainExaggeration;
|
|
1906
|
+
this.verticalExaggerationRelativeHeight =
|
|
1907
|
+
globe._terrainExaggerationRelativeHeight;
|
|
1908
|
+
globe._terrainExaggerationChanged = false;
|
|
1886
1909
|
}
|
|
1910
|
+
frameState.verticalExaggeration = this.verticalExaggeration;
|
|
1911
|
+
frameState.verticalExaggerationRelativeHeight = this.verticalExaggerationRelativeHeight;
|
|
1887
1912
|
|
|
1888
1913
|
if (
|
|
1889
1914
|
defined(this._specularEnvironmentMapAtlas) &&
|
|
@@ -17,7 +17,7 @@ import OrthographicFrustum from "../Core/OrthographicFrustum.js";
|
|
|
17
17
|
import Plane from "../Core/Plane.js";
|
|
18
18
|
import Quaternion from "../Core/Quaternion.js";
|
|
19
19
|
import Ray from "../Core/Ray.js";
|
|
20
|
-
import
|
|
20
|
+
import VerticalExaggeration from "../Core/VerticalExaggeration.js";
|
|
21
21
|
import Transforms from "../Core/Transforms.js";
|
|
22
22
|
import CameraEventAggregator from "./CameraEventAggregator.js";
|
|
23
23
|
import CameraEventType from "./CameraEventType.js";
|
|
@@ -2948,9 +2948,7 @@ const scratchPreviousDirection = new Cartesian3();
|
|
|
2948
2948
|
*/
|
|
2949
2949
|
ScreenSpaceCameraController.prototype.update = function () {
|
|
2950
2950
|
const scene = this._scene;
|
|
2951
|
-
const camera = scene
|
|
2952
|
-
const globe = scene.globe;
|
|
2953
|
-
const mode = scene.mode;
|
|
2951
|
+
const { camera, globe, mode } = scene;
|
|
2954
2952
|
|
|
2955
2953
|
if (!Matrix4.equals(camera.transform, Matrix4.IDENTITY)) {
|
|
2956
2954
|
this._globe = undefined;
|
|
@@ -2962,26 +2960,21 @@ ScreenSpaceCameraController.prototype.update = function () {
|
|
|
2962
2960
|
: scene.mapProjection.ellipsoid;
|
|
2963
2961
|
}
|
|
2964
2962
|
|
|
2965
|
-
const
|
|
2966
|
-
|
|
2967
|
-
: 1.0;
|
|
2968
|
-
const exaggerationRelativeHeight = defined(this._globe)
|
|
2969
|
-
? this._globe.terrainExaggerationRelativeHeight
|
|
2970
|
-
: 0.0;
|
|
2971
|
-
this._minimumCollisionTerrainHeight = TerrainExaggeration.getHeight(
|
|
2963
|
+
const { verticalExaggeration, verticalExaggerationRelativeHeight } = scene;
|
|
2964
|
+
this._minimumCollisionTerrainHeight = VerticalExaggeration.getHeight(
|
|
2972
2965
|
this.minimumCollisionTerrainHeight,
|
|
2973
|
-
|
|
2974
|
-
|
|
2966
|
+
verticalExaggeration,
|
|
2967
|
+
verticalExaggerationRelativeHeight
|
|
2975
2968
|
);
|
|
2976
|
-
this._minimumPickingTerrainHeight =
|
|
2969
|
+
this._minimumPickingTerrainHeight = VerticalExaggeration.getHeight(
|
|
2977
2970
|
this.minimumPickingTerrainHeight,
|
|
2978
|
-
|
|
2979
|
-
|
|
2971
|
+
verticalExaggeration,
|
|
2972
|
+
verticalExaggerationRelativeHeight
|
|
2980
2973
|
);
|
|
2981
|
-
this._minimumTrackBallHeight =
|
|
2974
|
+
this._minimumTrackBallHeight = VerticalExaggeration.getHeight(
|
|
2982
2975
|
this.minimumTrackBallHeight,
|
|
2983
|
-
|
|
2984
|
-
|
|
2976
|
+
verticalExaggeration,
|
|
2977
|
+
verticalExaggerationRelativeHeight
|
|
2985
2978
|
);
|
|
2986
2979
|
|
|
2987
2980
|
this._cameraUnderground = scene.cameraUnderground && defined(this._globe);
|
|
@@ -830,9 +830,9 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
|
|
|
830
830
|
const fill = surfaceTile.fill;
|
|
831
831
|
const rectangle = tile.rectangle;
|
|
832
832
|
|
|
833
|
-
const exaggeration = frameState.
|
|
833
|
+
const exaggeration = frameState.verticalExaggeration;
|
|
834
834
|
const exaggerationRelativeHeight =
|
|
835
|
-
frameState.
|
|
835
|
+
frameState.verticalExaggerationRelativeHeight;
|
|
836
836
|
const hasExaggeration = exaggeration !== 1.0;
|
|
837
837
|
|
|
838
838
|
const ellipsoid = tile.tilingScheme.ellipsoid;
|
|
@@ -131,6 +131,38 @@ function VoxelPrimitive(options) {
|
|
|
131
131
|
*/
|
|
132
132
|
this._maxBoundsOld = new Cartesian3();
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Minimum bounds with vertical exaggeration applied
|
|
136
|
+
*
|
|
137
|
+
* @type {Cartesian3}
|
|
138
|
+
* @private
|
|
139
|
+
*/
|
|
140
|
+
this._exaggeratedMinBounds = new Cartesian3();
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Used to detect if the shape is dirty.
|
|
144
|
+
*
|
|
145
|
+
* @type {Cartesian3}
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
148
|
+
this._exaggeratedMinBoundsOld = new Cartesian3();
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Maximum bounds with vertical exaggeration applied
|
|
152
|
+
*
|
|
153
|
+
* @type {Cartesian3}
|
|
154
|
+
* @private
|
|
155
|
+
*/
|
|
156
|
+
this._exaggeratedMaxBounds = new Cartesian3();
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Used to detect if the shape is dirty.
|
|
160
|
+
*
|
|
161
|
+
* @type {Cartesian3}
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
164
|
+
this._exaggeratedMaxBoundsOld = new Cartesian3();
|
|
165
|
+
|
|
134
166
|
/**
|
|
135
167
|
* This member is not known until the provider is ready.
|
|
136
168
|
*
|
|
@@ -442,6 +474,7 @@ function initialize(primitive, provider) {
|
|
|
442
474
|
// Create the shape object, and update it so it is valid for VoxelTraversal
|
|
443
475
|
const ShapeConstructor = VoxelShapeType.getShapeConstructor(shapeType);
|
|
444
476
|
primitive._shape = new ShapeConstructor();
|
|
477
|
+
updateVerticalExaggeration(primitive);
|
|
445
478
|
primitive._shapeVisible = updateShapeAndTransforms(
|
|
446
479
|
primitive,
|
|
447
480
|
primitive._shape,
|
|
@@ -964,6 +997,8 @@ VoxelPrimitive.prototype.update = function (frameState) {
|
|
|
964
997
|
return;
|
|
965
998
|
}
|
|
966
999
|
|
|
1000
|
+
updateVerticalExaggeration(this, frameState);
|
|
1001
|
+
|
|
967
1002
|
// Check if the shape is dirty before updating it. This needs to happen every
|
|
968
1003
|
// frame because the member variables can be modified externally via the
|
|
969
1004
|
// getters.
|
|
@@ -1107,6 +1142,32 @@ VoxelPrimitive.prototype.update = function (frameState) {
|
|
|
1107
1142
|
frameState.commandList.push(command);
|
|
1108
1143
|
};
|
|
1109
1144
|
|
|
1145
|
+
/**
|
|
1146
|
+
* Update the exaggerated bounds of a primitive to account for vertical exaggeration
|
|
1147
|
+
* Currently only applies to Ellipsoid shape type
|
|
1148
|
+
* @param {VoxelPrimitive} primitive
|
|
1149
|
+
* @param {FrameState} [frameState]
|
|
1150
|
+
* @private
|
|
1151
|
+
*/
|
|
1152
|
+
function updateVerticalExaggeration(primitive, frameState) {
|
|
1153
|
+
primitive._exaggeratedMinBounds = Cartesian3.clone(
|
|
1154
|
+
primitive._minBounds,
|
|
1155
|
+
primitive._exaggeratedMinBounds
|
|
1156
|
+
);
|
|
1157
|
+
primitive._exaggeratedMaxBounds = Cartesian3.clone(
|
|
1158
|
+
primitive._maxBounds,
|
|
1159
|
+
primitive._exaggeratedMaxBounds
|
|
1160
|
+
);
|
|
1161
|
+
if (defined(frameState) && primitive.shape === VoxelShapeType.ELLIPSOID) {
|
|
1162
|
+
const relativeHeight = frameState.verticalExaggerationRelativeHeight;
|
|
1163
|
+
const exaggeration = frameState.verticalExaggeration;
|
|
1164
|
+
primitive._exaggeratedMinBounds.z =
|
|
1165
|
+
(primitive._minBounds.z - relativeHeight) * exaggeration + relativeHeight;
|
|
1166
|
+
primitive._exaggeratedMaxBounds.z =
|
|
1167
|
+
(primitive._maxBounds.z - relativeHeight) * exaggeration + relativeHeight;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1110
1171
|
/**
|
|
1111
1172
|
* Initialize primitive properties that are derived from the voxel provider
|
|
1112
1173
|
* @param {VoxelPrimitive} primitive
|
|
@@ -1203,6 +1264,16 @@ function checkTransformAndBounds(primitive, provider) {
|
|
|
1203
1264
|
updateBound(primitive, "_compoundModelMatrix", "_compoundModelMatrixOld") +
|
|
1204
1265
|
updateBound(primitive, "_minBounds", "_minBoundsOld") +
|
|
1205
1266
|
updateBound(primitive, "_maxBounds", "_maxBoundsOld") +
|
|
1267
|
+
updateBound(
|
|
1268
|
+
primitive,
|
|
1269
|
+
"_exaggeratedMinBounds",
|
|
1270
|
+
"_exaggeratedMinBoundsOld"
|
|
1271
|
+
) +
|
|
1272
|
+
updateBound(
|
|
1273
|
+
primitive,
|
|
1274
|
+
"_exaggeratedMaxBounds",
|
|
1275
|
+
"_exaggeratedMaxBoundsOld"
|
|
1276
|
+
) +
|
|
1206
1277
|
updateBound(primitive, "_minClippingBounds", "_minClippingBoundsOld") +
|
|
1207
1278
|
updateBound(primitive, "_maxClippingBounds", "_maxClippingBoundsOld");
|
|
1208
1279
|
return numChanges > 0;
|
|
@@ -1239,8 +1310,8 @@ function updateBound(primitive, newBoundKey, oldBoundKey) {
|
|
|
1239
1310
|
function updateShapeAndTransforms(primitive, shape, provider) {
|
|
1240
1311
|
const visible = shape.update(
|
|
1241
1312
|
primitive._compoundModelMatrix,
|
|
1242
|
-
primitive.
|
|
1243
|
-
primitive.
|
|
1313
|
+
primitive._exaggeratedMinBounds,
|
|
1314
|
+
primitive._exaggeratedMaxBounds,
|
|
1244
1315
|
primitive.minClippingBounds,
|
|
1245
1316
|
primitive.maxClippingBounds
|
|
1246
1317
|
);
|
|
@@ -11,7 +11,7 @@ in vec3 geodeticSurfaceNormal;
|
|
|
11
11
|
#endif
|
|
12
12
|
|
|
13
13
|
#ifdef EXAGGERATION
|
|
14
|
-
uniform vec2
|
|
14
|
+
uniform vec2 u_verticalExaggerationAndRelativeHeight;
|
|
15
15
|
#endif
|
|
16
16
|
|
|
17
17
|
uniform vec3 u_center3D;
|
|
@@ -173,8 +173,8 @@ void main()
|
|
|
173
173
|
#endif
|
|
174
174
|
|
|
175
175
|
#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
|
|
176
|
-
float exaggeration =
|
|
177
|
-
float relativeHeight =
|
|
176
|
+
float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
|
|
177
|
+
float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
|
|
178
178
|
float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;
|
|
179
179
|
|
|
180
180
|
// stop from going through center of earth
|
|
@@ -12,7 +12,7 @@ in vec3 geodeticSurfaceNormal;\n\
|
|
|
12
12
|
#endif\n\
|
|
13
13
|
\n\
|
|
14
14
|
#ifdef EXAGGERATION\n\
|
|
15
|
-
uniform vec2
|
|
15
|
+
uniform vec2 u_verticalExaggerationAndRelativeHeight;\n\
|
|
16
16
|
#endif\n\
|
|
17
17
|
\n\
|
|
18
18
|
uniform vec3 u_center3D;\n\
|
|
@@ -174,8 +174,8 @@ void main()\n\
|
|
|
174
174
|
#endif\n\
|
|
175
175
|
\n\
|
|
176
176
|
#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n\
|
|
177
|
-
float exaggeration =
|
|
178
|
-
float relativeHeight =
|
|
177
|
+
float exaggeration = u_verticalExaggerationAndRelativeHeight.x;\n\
|
|
178
|
+
float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;\n\
|
|
179
179
|
float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;\n\
|
|
180
180
|
\n\
|
|
181
181
|
// stop from going through center of earth\n\
|
|
@@ -93,6 +93,10 @@ void main()
|
|
|
93
93
|
MetadataStatistics metadataStatistics;
|
|
94
94
|
metadataStage(metadata, metadataClass, metadataStatistics, attributes);
|
|
95
95
|
|
|
96
|
+
#ifdef HAS_VERTICAL_EXAGGERATION
|
|
97
|
+
verticalExaggerationStage(attributes);
|
|
98
|
+
#endif
|
|
99
|
+
|
|
96
100
|
#ifdef HAS_CUSTOM_VERTEX_SHADER
|
|
97
101
|
czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
|
|
98
102
|
customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
|
|
@@ -93,6 +93,10 @@ void main() \n\
|
|
|
93
93
|
MetadataClass metadataClass;\n\
|
|
94
94
|
MetadataStatistics metadataStatistics;\n\
|
|
95
95
|
metadataStage(metadata, metadataClass, metadataStatistics, attributes);\n\
|
|
96
|
+
\n\
|
|
97
|
+
#ifdef HAS_VERTICAL_EXAGGERATION\n\
|
|
98
|
+
verticalExaggerationStage(attributes);\n\
|
|
99
|
+
#endif\n\
|
|
96
100
|
\n\
|
|
97
101
|
#ifdef HAS_CUSTOM_VERTEX_SHADER\n\
|
|
98
102
|
czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);\n\
|