@hztxi/cesium-engine 25.0.3 → 25.0.6

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.
Files changed (186) hide show
  1. package/Build/Workers/chunk-247MLVK2.js +124 -0
  2. package/Build/Workers/chunk-26I7TIAE.js +58 -0
  3. package/Build/Workers/chunk-26OYTC24.js +38 -0
  4. package/Build/Workers/chunk-2IMOZG7R.js +973 -0
  5. package/Build/Workers/chunk-2L6JGSYJ.js +57 -0
  6. package/Build/Workers/chunk-32N2SB76.js +56 -0
  7. package/Build/Workers/chunk-37WL527K.js +1287 -0
  8. package/Build/Workers/chunk-3B2TIEWW.js +73 -0
  9. package/Build/Workers/chunk-3HOOLJ6E.js +1483 -0
  10. package/Build/Workers/chunk-3IGH46TC.js +1054 -0
  11. package/Build/Workers/chunk-3MWOYCFC.js +511 -0
  12. package/Build/Workers/chunk-3Q52BERF.js +476 -0
  13. package/Build/Workers/chunk-47BSFGJC.js +837 -0
  14. package/Build/Workers/chunk-4J7PL5AM.js +454 -0
  15. package/Build/Workers/chunk-4MHUA5ZK.js +163 -0
  16. package/Build/Workers/chunk-4UMO63VY.js +76 -0
  17. package/Build/Workers/chunk-5BVKUNRB.js +368 -0
  18. package/Build/Workers/chunk-5YI3TQQC.js +778 -0
  19. package/Build/Workers/chunk-642GMGGP.js +162 -0
  20. package/Build/Workers/chunk-65LZTCWG.js +1344 -0
  21. package/Build/Workers/chunk-6PYOAYJD.js +1046 -0
  22. package/Build/Workers/chunk-AEZQ2UWS.js +288 -0
  23. package/Build/Workers/chunk-AH6GJ5MT.js +754 -0
  24. package/Build/Workers/chunk-AM56LGEB.js +352 -0
  25. package/Build/Workers/chunk-AXE2ZIEG.js +219 -0
  26. package/Build/Workers/chunk-BDR7GL3E.js +1067 -0
  27. package/Build/Workers/chunk-C342XITR.js +44 -0
  28. package/Build/Workers/chunk-CADDH6MK.js +140 -0
  29. package/Build/Workers/chunk-CEIY3YH2.js +57 -0
  30. package/Build/Workers/chunk-CJT3FTZK.js +58 -0
  31. package/Build/Workers/chunk-CV7K25H3.js +138 -0
  32. package/Build/Workers/chunk-CWAUXQRF.js +754 -0
  33. package/Build/Workers/chunk-DNEERCHO.js +171 -0
  34. package/Build/Workers/chunk-E5F7LDEP.js +3201 -0
  35. package/Build/Workers/chunk-EHXAKTME.js +147 -0
  36. package/Build/Workers/chunk-FAKYMBUA.js +1046 -0
  37. package/Build/Workers/chunk-FF6JKPLF.js +454 -0
  38. package/Build/Workers/chunk-FSK4OZOO.js +352 -0
  39. package/Build/Workers/chunk-FSLRYNZ6.js +682 -0
  40. package/Build/Workers/chunk-FTRHXHI5.js +3794 -0
  41. package/Build/Workers/chunk-GH2D6MPO.js +497 -0
  42. package/Build/Workers/chunk-GHVEEVR7.js +778 -0
  43. package/Build/Workers/chunk-GMDOGAXK.js +2719 -0
  44. package/Build/Workers/chunk-GRAFCIPA.js +455 -0
  45. package/Build/Workers/chunk-HEY4IOS3.js +140 -0
  46. package/Build/Workers/chunk-HRWFO57T.js +301 -0
  47. package/Build/Workers/chunk-HTCLVUBZ.js +82 -0
  48. package/Build/Workers/chunk-HUNCRVVV.js +1067 -0
  49. package/Build/Workers/chunk-I2Q7XDRA.js +630 -0
  50. package/Build/Workers/chunk-IFSGYIDE.js +257 -0
  51. package/Build/Workers/chunk-ILPH3NF7.js +3794 -0
  52. package/Build/Workers/chunk-ISRYZ3F4.js +414 -0
  53. package/Build/Workers/chunk-JBJ5PC2D.js +102 -0
  54. package/Build/Workers/chunk-JFPBQCDB.js +398 -0
  55. package/Build/Workers/chunk-JKPELBSI.js +682 -0
  56. package/Build/Workers/chunk-JLLWLD6O.js +973 -0
  57. package/Build/Workers/chunk-JZUUODN6.js +97 -0
  58. package/Build/Workers/chunk-KCUS7QEU.js +387 -0
  59. package/Build/Workers/chunk-KFRKYG4B.js +288 -0
  60. package/Build/Workers/chunk-KWVB54J6.js +241 -0
  61. package/Build/Workers/chunk-LERIK6IA.js +219 -0
  62. package/Build/Workers/chunk-LOVXQI64.js +2719 -0
  63. package/Build/Workers/chunk-M3B3ZUU2.js +476 -0
  64. package/Build/Workers/chunk-MD7CEJO5.js +2342 -0
  65. package/Build/Workers/chunk-MKR6YCMG.js +497 -0
  66. package/Build/Workers/chunk-MROMS2RL.js +162 -0
  67. package/Build/Workers/chunk-MUNAUSK7.js +280 -0
  68. package/Build/Workers/chunk-NHU5JEPP.js +1344 -0
  69. package/Build/Workers/chunk-OKPQ3QBG.js +124 -0
  70. package/Build/Workers/chunk-OODXPB45.js +73 -0
  71. package/Build/Workers/chunk-OXZ5J3JW.js +368 -0
  72. package/Build/Workers/chunk-PC7533X2.js +1800 -0
  73. package/Build/Workers/chunk-PCXE4XMI.js +82 -0
  74. package/Build/Workers/chunk-PXPUYOFJ.js +1287 -0
  75. package/Build/Workers/chunk-QBSWSTHY.js +257 -0
  76. package/Build/Workers/chunk-QDJYG7QL.js +352 -0
  77. package/Build/Workers/chunk-QX6AYJX2.js +455 -0
  78. package/Build/Workers/chunk-RSJUCJPN.js +241 -0
  79. package/Build/Workers/chunk-RX3U2BBW.js +1483 -0
  80. package/Build/Workers/chunk-S3XHL7GO.js +1992 -0
  81. package/Build/Workers/chunk-SBIC4OGS.js +171 -0
  82. package/Build/Workers/chunk-SPTT255E.js +301 -0
  83. package/Build/Workers/chunk-STXWAEVD.js +101 -0
  84. package/Build/Workers/chunk-SUG6ECWR.js +76 -0
  85. package/Build/Workers/chunk-T4CYNROE.js +102 -0
  86. package/Build/Workers/chunk-T5VLPB4H.js +414 -0
  87. package/Build/Workers/chunk-TPT5IM72.js +280 -0
  88. package/Build/Workers/chunk-TTG2JNFN.js +198 -0
  89. package/Build/Workers/chunk-TX763OWB.js +387 -0
  90. package/Build/Workers/chunk-UDXUBVNR.js +1992 -0
  91. package/Build/Workers/chunk-UNXJWCXV.js +9230 -0
  92. package/Build/Workers/chunk-UTAWMCSE.js +163 -0
  93. package/Build/Workers/chunk-UTKCX3AS.js +352 -0
  94. package/Build/Workers/chunk-VETQOADR.js +2342 -0
  95. package/Build/Workers/chunk-VL2WHGQI.js +305 -0
  96. package/Build/Workers/chunk-VXRWOM3T.js +101 -0
  97. package/Build/Workers/chunk-W37YFRTG.js +38 -0
  98. package/Build/Workers/chunk-W5AGSDWX.js +44 -0
  99. package/Build/Workers/chunk-WBQDTVCN.js +97 -0
  100. package/Build/Workers/chunk-WDSHSR57.js +837 -0
  101. package/Build/Workers/chunk-WVVFCMYF.js +147 -0
  102. package/Build/Workers/chunk-XAVNBZQ6.js +56 -0
  103. package/Build/Workers/chunk-XDSDR62Y.js +1800 -0
  104. package/Build/Workers/chunk-XDZCVNIZ.js +198 -0
  105. package/Build/Workers/chunk-XNLCW2OI.js +138 -0
  106. package/Build/Workers/chunk-XNQ2BTJD.js +693 -0
  107. package/Build/Workers/chunk-XPIDT6UT.js +1054 -0
  108. package/Build/Workers/chunk-XQETP7YD.js +3201 -0
  109. package/Build/Workers/chunk-XZYBDSFP.js +305 -0
  110. package/Build/Workers/chunk-YDYN3RPI.js +398 -0
  111. package/Build/Workers/chunk-YMMEQBEW.js +511 -0
  112. package/Build/Workers/chunk-YQFOQAXD.js +9230 -0
  113. package/Build/Workers/chunk-Z3KHKVNA.js +56 -0
  114. package/Build/Workers/chunk-Z7XRKD6H.js +693 -0
  115. package/Build/Workers/chunk-ZQUSI7YK.js +630 -0
  116. package/Build/Workers/chunk-ZY4DTNR2.js +56 -0
  117. package/Build/Workers/combineGeometry.js +24 -24
  118. package/Build/Workers/createBoxGeometry.js +18 -18
  119. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  120. package/Build/Workers/createCircleGeometry.js +26 -26
  121. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  122. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  123. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  124. package/Build/Workers/createCorridorGeometry.js +29 -29
  125. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  126. package/Build/Workers/createCylinderGeometry.js +20 -20
  127. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  128. package/Build/Workers/createEllipseGeometry.js +26 -26
  129. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  130. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  131. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  132. package/Build/Workers/createFrustumGeometry.js +18 -18
  133. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  134. package/Build/Workers/createGeometry.js +24 -24
  135. package/Build/Workers/createGroundPolylineGeometry.js +23 -23
  136. package/Build/Workers/createPlaneGeometry.js +16 -16
  137. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  138. package/Build/Workers/createPolygonGeometry.js +32 -32
  139. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  140. package/Build/Workers/createPolylineGeometry.js +25 -25
  141. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  142. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  143. package/Build/Workers/createRectangleGeometry.js +27 -27
  144. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  145. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  146. package/Build/Workers/createSphereGeometry.js +19 -19
  147. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  148. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  149. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  150. package/Build/Workers/createVectorTileGeometries.js +24 -24
  151. package/Build/Workers/createVectorTilePoints.js +13 -13
  152. package/Build/Workers/createVectorTilePolygons.js +22 -22
  153. package/Build/Workers/createVectorTilePolylines.js +14 -14
  154. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
  155. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
  156. package/Build/Workers/createVerticesFromHeightmap.js +23 -23
  157. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
  158. package/Build/Workers/createWallGeometry.js +24 -24
  159. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  160. package/Build/Workers/decodeDraco.js +10 -10
  161. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  162. package/Build/Workers/decodeI3S.js +10 -10
  163. package/Build/Workers/gaussianSplatSorter.js +4 -4
  164. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  165. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  166. package/Build/Workers/transcodeKTX2.js +6 -6
  167. package/Build/Workers/transferTypedArrayTest.js +1 -1
  168. package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
  169. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
  170. package/Source/Scene/ClassificationPrimitive.js +63 -3
  171. package/Source/Scene/Globe.js +55 -0
  172. package/Source/Scene/GlobeSurfaceShaderSet.js +132 -1
  173. package/Source/Scene/GlobeSurfaceTileProvider.js +378 -2
  174. package/Source/Scene/ImageryLayer.js +244 -10
  175. package/Source/Scene/PolylineCollection.js +4 -2
  176. package/Source/Scene/QuadtreePrimitive.js +256 -2
  177. package/Source/Shaders/GlobeFS.glsl +43 -0
  178. package/Source/Shaders/GlobeFS.js +43 -0
  179. package/Source/Shaders/PolylineShadowVolumeMorphVS.glsl +14 -1
  180. package/Source/Shaders/PolylineShadowVolumeMorphVS.js +14 -1
  181. package/Source/Shaders/PolylineShadowVolumeVS.glsl +7 -0
  182. package/Source/Shaders/PolylineShadowVolumeVS.js +7 -0
  183. package/Source/Shaders/PolylineVS.glsl +16 -6
  184. package/Source/Shaders/PolylineVS.js +16 -6
  185. package/index.js +286 -286
  186. package/package.json +1 -1
@@ -27,6 +27,39 @@ uniform float u_dayTextureBrightness[TEXTURE_UNITS];\n\
27
27
  uniform float u_dayTextureContrast[TEXTURE_UNITS];\n\
28
28
  #endif\n\
29
29
  \n\
30
+ #ifdef APPLY_TONE_MATCH\n\
31
+ uniform vec3 u_dayTextureToneGain[TEXTURE_UNITS];\n\
32
+ uniform vec3 u_dayTextureToneBias[TEXTURE_UNITS];\n\
33
+ #endif\n\
34
+ \n\
35
+ #ifdef APPLY_TONE_MATCH_EDGE\n\
36
+ // Per-texture fade targets at the four geographic edges of the surface tile\n\
37
+ // (index order: 0 = south, 1 = east, 2 = north, 3 = west).\n\
38
+ // u_dayTextureToneEdgeBlend holds one band width per geographic edge as a\n\
39
+ // fraction of the tile extent; only edges with a coarser neighbor get a\n\
40
+ // positive width, so same-level/finer edges never participate in the fade\n\
41
+ // (an edge that faded toward the texture's own correction would reset the\n\
42
+ // fade contributed by another edge near their corner).\n\
43
+ uniform vec3 u_dayTextureToneEdgeGain[TEXTURE_UNITS * 4];\n\
44
+ uniform vec3 u_dayTextureToneEdgeBias[TEXTURE_UNITS * 4];\n\
45
+ uniform float u_dayTextureToneEdgeBlend[TEXTURE_UNITS * 4];\n\
46
+ #endif\n\
47
+ \n\
48
+ #ifdef APPLY_TONE_MATCH_CROSS\n\
49
+ // Per-texture ancestor imagery for content cross-fading at edges facing a\n\
50
+ // coarser neighbor: near such an edge the tile blends its full rendered result\n\
51
+ // with the ancestor's rendering (ancestor texture sampled with the ancestor\n\
52
+ // level's correction), making both sides of the boundary identical at the\n\
53
+ // shared edge. u_dayTextureCrossBlend holds one band width per geographic edge\n\
54
+ // (0 = south, 1 = east, 2 = north, 3 = west); an edge only fades when its\n\
55
+ // neighbor's imagery level matches the bound ancestor's level.\n\
56
+ uniform sampler2D u_dayTextureCrossTexture[TEXTURE_UNITS];\n\
57
+ uniform vec4 u_dayTextureCrossTranslationAndScale[TEXTURE_UNITS];\n\
58
+ uniform vec3 u_dayTextureCrossGain[TEXTURE_UNITS];\n\
59
+ uniform vec3 u_dayTextureCrossBias[TEXTURE_UNITS];\n\
60
+ uniform float u_dayTextureCrossBlend[TEXTURE_UNITS * 4];\n\
61
+ #endif\n\
62
+ \n\
30
63
  #ifdef APPLY_HUE\n\
31
64
  uniform float u_dayTextureHue[TEXTURE_UNITS];\n\
32
65
  #endif\n\
@@ -200,6 +233,8 @@ vec4 sampleAndBlend(\n\
200
233
  float textureHue,\n\
201
234
  float textureSaturation,\n\
202
235
  float textureOneOverGamma,\n\
236
+ vec3 textureToneGain,\n\
237
+ vec3 textureToneBias,\n\
203
238
  float split,\n\
204
239
  vec4 colorToAlpha,\n\
205
240
  float nightBlend)\n\
@@ -228,6 +263,13 @@ vec4 sampleAndBlend(\n\
228
263
  vec3 color = value.rgb;\n\
229
264
  float alpha = value.a;\n\
230
265
  \n\
266
+ #ifdef APPLY_TONE_MATCH\n\
267
+ // Applied directly after sampling so the affine correction, which is fitted\n\
268
+ // in source-image color space, commutes with the identical transforms that\n\
269
+ // follow for both the tile and the imagery it replaces.\n\
270
+ color = color * textureToneGain + textureToneBias;\n\
271
+ #endif\n\
272
+ \n\
231
273
  #ifdef APPLY_COLOR_TO_ALPHA\n\
232
274
  vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);\n\
233
275
  colorDiff.r = czm_maximumComponent(colorDiff);\n\
@@ -691,4 +733,5 @@ vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat
691
733
  }\n\
692
734
  \n\
693
735
  #endif // #ifdef SHOW_REFLECTIVE_OCEAN\n\
736
+ \n\
694
737
  ";
@@ -104,11 +104,24 @@ void main()
104
104
 
105
105
  #ifdef WIDTH_VARYING
106
106
  float width = czm_batchTable_width(batchId);
107
+ // HZ patch: negative batch width encodes metric sizing (world meters).
108
+ if (width < 0.0)
109
+ {
110
+ vec4 metricPosEC = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);
111
+ width = clamp((-width) / czm_metersPerPixel(metricPosEC), 1.0, 4096.0);
112
+ }
107
113
  float halfWidth = width * 0.5;
108
114
  v_width = width;
109
115
  v_texcoordNormalizationAndHalfWidth.z = halfWidth;
110
116
  #else
111
- float halfWidth = 0.5 * czm_batchTable_width(batchId);
117
+ float width = czm_batchTable_width(batchId);
118
+ // HZ patch: negative batch width encodes metric sizing (world meters).
119
+ if (width < 0.0)
120
+ {
121
+ vec4 metricPosEC = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);
122
+ width = clamp((-width) / czm_metersPerPixel(metricPosEC), 1.0, 4096.0);
123
+ }
124
+ float halfWidth = width * 0.5;
112
125
  v_texcoordNormalizationAndHalfWidth.z = halfWidth;
113
126
  #endif
114
127
 
@@ -105,11 +105,24 @@ void main()\n\
105
105
  \n\
106
106
  #ifdef WIDTH_VARYING\n\
107
107
  float width = czm_batchTable_width(batchId);\n\
108
+ // HZ patch: negative batch width encodes metric sizing (world meters).\n\
109
+ if (width < 0.0)\n\
110
+ {\n\
111
+ vec4 metricPosEC = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\n\
112
+ width = clamp((-width) / czm_metersPerPixel(metricPosEC), 1.0, 4096.0);\n\
113
+ }\n\
108
114
  float halfWidth = width * 0.5;\n\
109
115
  v_width = width;\n\
110
116
  v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n\
111
117
  #else\n\
112
- float halfWidth = 0.5 * czm_batchTable_width(batchId);\n\
118
+ float width = czm_batchTable_width(batchId);\n\
119
+ // HZ patch: negative batch width encodes metric sizing (world meters).\n\
120
+ if (width < 0.0)\n\
121
+ {\n\
122
+ vec4 metricPosEC = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\n\
123
+ width = clamp((-width) / czm_metersPerPixel(metricPosEC), 1.0, 4096.0);\n\
124
+ }\n\
125
+ float halfWidth = width * 0.5;\n\
113
126
  v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n\
114
127
  #endif\n\
115
128
  \n\
@@ -136,6 +136,13 @@ void main()
136
136
  // o---------- polyline segment ---->
137
137
  //
138
138
  float width = czm_batchTable_width(batchId);
139
+ // HZ patch: negative batch width encodes metric sizing (world meters).
140
+ // Convert to a pixel-equivalent here so the metersPerPixel multiply below
141
+ // restores the metric world width every frame, with no CPU involvement.
142
+ if (width < 0.0)
143
+ {
144
+ width = clamp((-width) / czm_metersPerPixel(positionEC), 1.0, 4096.0);
145
+ }
139
146
  #ifdef WIDTH_VARYING
140
147
  v_width = width;
141
148
  #endif
@@ -137,6 +137,13 @@ void main()\n\
137
137
  // o---------- polyline segment ---->\n\
138
138
  //\n\
139
139
  float width = czm_batchTable_width(batchId);\n\
140
+ // HZ patch: negative batch width encodes metric sizing (world meters).\n\
141
+ // Convert to a pixel-equivalent here so the metersPerPixel multiply below\n\
142
+ // restores the metric world width every frame, with no CPU involvement.\n\
143
+ if (width < 0.0)\n\
144
+ {\n\
145
+ width = clamp((-width) / czm_metersPerPixel(positionEC), 1.0, 4096.0);\n\
146
+ }\n\
140
147
  #ifdef WIDTH_VARYING\n\
141
148
  v_width = width;\n\
142
149
  #endif\n\
@@ -25,14 +25,9 @@ void main()
25
25
  float batchTableIndex = texCoordExpandAndBatchIndex.w;
26
26
 
27
27
  vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
28
- float width = widthAndShow.x + 0.5;
28
+ float width = widthAndShow.x;
29
29
  float show = widthAndShow.y;
30
30
 
31
- if (width < 1.0)
32
- {
33
- show = 0.0;
34
- }
35
-
36
31
  vec4 pickColor = batchTable_getPickColor(batchTableIndex);
37
32
 
38
33
  vec4 p, prev, next;
@@ -64,6 +59,21 @@ void main()
64
59
  czm_morphTime);
65
60
  }
66
61
 
62
+ // HZ patch: negative batch width encodes metric sizing (world meters).
63
+ // Convert to pixels per frame on the GPU so metric width tracks zoom
64
+ // without CPU property updates or geometry rebuilds.
65
+ if (width < 0.0)
66
+ {
67
+ vec4 posEC = czm_modelViewRelativeToEye * p;
68
+ width = clamp((-width) / czm_metersPerPixel(posEC), 1.0, 4096.0);
69
+ }
70
+ width += 0.5;
71
+
72
+ if (width < 1.0)
73
+ {
74
+ show = 0.0;
75
+ }
76
+
67
77
  #ifdef DISTANCE_DISPLAY_CONDITION
68
78
  vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
69
79
  vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
@@ -26,13 +26,8 @@ void main()\n\
26
26
  float batchTableIndex = texCoordExpandAndBatchIndex.w;\n\
27
27
  \n\
28
28
  vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\n\
29
- float width = widthAndShow.x + 0.5;\n\
29
+ float width = widthAndShow.x;\n\
30
30
  float show = widthAndShow.y;\n\
31
- \n\
32
- if (width < 1.0)\n\
33
- {\n\
34
- show = 0.0;\n\
35
- }\n\
36
31
  \n\
37
32
  vec4 pickColor = batchTable_getPickColor(batchTableIndex);\n\
38
33
  \n\
@@ -64,6 +59,21 @@ void main()\n\
64
59
  czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\n\
65
60
  czm_morphTime);\n\
66
61
  }\n\
62
+ \n\
63
+ // HZ patch: negative batch width encodes metric sizing (world meters).\n\
64
+ // Convert to pixels per frame on the GPU so metric width tracks zoom\n\
65
+ // without CPU property updates or geometry rebuilds.\n\
66
+ if (width < 0.0)\n\
67
+ {\n\
68
+ vec4 posEC = czm_modelViewRelativeToEye * p;\n\
69
+ width = clamp((-width) / czm_metersPerPixel(posEC), 1.0, 4096.0);\n\
70
+ }\n\
71
+ width += 0.5;\n\
72
+ \n\
73
+ if (width < 1.0)\n\
74
+ {\n\
75
+ show = 0.0;\n\
76
+ }\n\
67
77
  \n\
68
78
  #ifdef DISTANCE_DISPLAY_CONDITION\n\
69
79
  vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\n\