@cesium/engine 23.0.1 → 24.0.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.
Files changed (226) hide show
  1. package/Build/Workers/{chunk-G6MJ3ZW3.js → chunk-2N4KDHS3.js} +10 -10
  2. package/Build/Workers/{chunk-C6HHBKT5.js → chunk-44EMEGKW.js} +5 -5
  3. package/Build/Workers/{chunk-TNXOPEIG.js → chunk-4TIG36AW.js} +12 -12
  4. package/Build/Workers/{chunk-PQTSXJBJ.js → chunk-5A2SW66E.js} +16 -16
  5. package/Build/Workers/{chunk-TXYQNXNW.js → chunk-5GXYJQ2K.js} +3 -3
  6. package/Build/Workers/{chunk-O67UP5YO.js → chunk-63SIWPLS.js} +13 -13
  7. package/Build/Workers/{chunk-CVAAIRNP.js → chunk-6MPGQEHA.js} +2 -2
  8. package/Build/Workers/{chunk-LHFC4R7Z.js → chunk-6RMS4S72.js} +6 -6
  9. package/Build/Workers/{chunk-77DJBHMI.js → chunk-6WLHJFD3.js} +7 -7
  10. package/Build/Workers/{chunk-HXEPZWJN.js → chunk-72VYSVEW.js} +9 -9
  11. package/Build/Workers/{chunk-VPWYHFQA.js → chunk-7MDYBRYJ.js} +4 -4
  12. package/Build/Workers/{chunk-XPMXRJDD.js → chunk-7O5XJTVE.js} +5 -5
  13. package/Build/Workers/{chunk-UEWYSOFD.js → chunk-7QRFIKWQ.js} +2 -2
  14. package/Build/Workers/{chunk-3UQ2YMPP.js → chunk-7TYLCBGK.js} +8 -8
  15. package/Build/Workers/{chunk-GLCPE2BJ.js → chunk-7X322WP2.js} +13 -13
  16. package/Build/Workers/{chunk-2OBWHTIC.js → chunk-A47HVBC5.js} +7 -7
  17. package/Build/Workers/{chunk-CID5SY7L.js → chunk-AF3MU2RL.js} +5 -5
  18. package/Build/Workers/{chunk-BTP3634E.js → chunk-AJLTU6PF.js} +1 -1
  19. package/Build/Workers/{chunk-YSJRB2UZ.js → chunk-AMIHNSST.js} +2 -2
  20. package/Build/Workers/{chunk-QPXGGVHC.js → chunk-B6SCUUFP.js} +10 -10
  21. package/Build/Workers/{chunk-QNABVTTP.js → chunk-BJD6QGXZ.js} +12 -12
  22. package/Build/Workers/{chunk-RZX6LOG6.js → chunk-C6P4IG5P.js} +6 -6
  23. package/Build/Workers/{chunk-4JJQRZYL.js → chunk-D4EJ2NXG.js} +17 -17
  24. package/Build/Workers/{chunk-K7UTK4OM.js → chunk-DHKPFLSJ.js} +1 -1
  25. package/Build/Workers/{chunk-S53HSRT6.js → chunk-DVB56LG7.js} +6 -6
  26. package/Build/Workers/{chunk-PBECJOWF.js → chunk-EDXL4W76.js} +2 -2
  27. package/Build/Workers/{chunk-ALTCIHRH.js → chunk-EV3VGO6Y.js} +17 -17
  28. package/Build/Workers/{chunk-UOQB7XQI.js → chunk-GOQBUCXH.js} +10 -10
  29. package/Build/Workers/{chunk-TMCTZ5E3.js → chunk-GQUNK2XC.js} +14 -14
  30. package/Build/Workers/{chunk-PAFMAR7A.js → chunk-HKUES6UG.js} +12 -12
  31. package/Build/Workers/{chunk-6U5QMZU3.js → chunk-HRHRYFHS.js} +9 -9
  32. package/Build/Workers/{chunk-PUO7BYDY.js → chunk-HXJMS2ZI.js} +1 -1
  33. package/Build/Workers/{chunk-FXSRA5UG.js → chunk-ILMFADZA.js} +4 -4
  34. package/Build/Workers/{chunk-U4SWB6TI.js → chunk-ISY4EZCA.js} +4 -4
  35. package/Build/Workers/{chunk-PGZ3B6CB.js → chunk-J6AW5YHS.js} +14 -14
  36. package/Build/Workers/{chunk-VX774SWE.js → chunk-JCI63T3K.js} +6 -6
  37. package/Build/Workers/{chunk-54O3AGOA.js → chunk-KLPGTXS3.js} +6 -6
  38. package/Build/Workers/{chunk-CNLXMOPM.js → chunk-LIB2H534.js} +10 -10
  39. package/Build/Workers/{chunk-H3TVRJLY.js → chunk-LXMCPFFS.js} +4 -4
  40. package/Build/Workers/{chunk-DNMASBMH.js → chunk-MKM27KGV.js} +2 -2
  41. package/Build/Workers/{chunk-66OWUDO7.js → chunk-N65BAKSH.js} +8 -8
  42. package/Build/Workers/{chunk-ZEMJQKHD.js → chunk-NKT5K3K3.js} +11 -11
  43. package/Build/Workers/{chunk-EIC3VAOZ.js → chunk-NPF7SSHZ.js} +7 -7
  44. package/Build/Workers/{chunk-YDR5LX5Z.js → chunk-PVV64VFW.js} +1 -1
  45. package/Build/Workers/{chunk-FKU77FNM.js → chunk-Q3C6VQH6.js} +4 -4
  46. package/Build/Workers/{chunk-CYOPNGPX.js → chunk-RQNJD3O4.js} +12 -12
  47. package/Build/Workers/{chunk-IJ3SUMK3.js → chunk-UIGVOKKI.js} +1 -1
  48. package/Build/Workers/{chunk-TFPG3ZKW.js → chunk-UQU4RXLT.js} +27 -19
  49. package/Build/Workers/{chunk-N6HRZLS6.js → chunk-VLDEUTOP.js} +2 -2
  50. package/Build/Workers/{chunk-MNSNOONX.js → chunk-VMVOUQ5J.js} +7 -7
  51. package/Build/Workers/{chunk-OZYB3AOR.js → chunk-XJRBB253.js} +11 -11
  52. package/Build/Workers/{chunk-B2VA6IEL.js → chunk-XY6HMDGI.js} +5 -5
  53. package/Build/Workers/{chunk-2M7DKGLW.js → chunk-Y7HNNPNK.js} +10 -10
  54. package/Build/Workers/{chunk-CJ7ZDY77.js → chunk-YAOZMOFL.js} +5 -5
  55. package/Build/Workers/{chunk-FCJQO4NC.js → chunk-YJZGW74L.js} +8 -8
  56. package/Build/Workers/{chunk-JUKGMJX7.js → chunk-YQFTYQMZ.js} +1 -1
  57. package/Build/Workers/{chunk-HNDE73JK.js → chunk-ZBZRTRJB.js} +10 -10
  58. package/Build/Workers/combineGeometry.js +24 -24
  59. package/Build/Workers/createBoxGeometry.js +18 -18
  60. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  61. package/Build/Workers/createCircleGeometry.js +26 -26
  62. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  63. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  64. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  65. package/Build/Workers/createCorridorGeometry.js +29 -29
  66. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  67. package/Build/Workers/createCylinderGeometry.js +20 -20
  68. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  69. package/Build/Workers/createEllipseGeometry.js +26 -26
  70. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  71. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  73. package/Build/Workers/createFrustumGeometry.js +18 -18
  74. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  75. package/Build/Workers/createGeometry.js +24 -24
  76. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  77. package/Build/Workers/createPlaneGeometry.js +16 -16
  78. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  79. package/Build/Workers/createPolygonGeometry.js +32 -32
  80. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  81. package/Build/Workers/createPolylineGeometry.js +25 -25
  82. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  83. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  84. package/Build/Workers/createRectangleGeometry.js +27 -27
  85. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  86. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  87. package/Build/Workers/createSphereGeometry.js +19 -19
  88. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  89. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  90. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  91. package/Build/Workers/createVectorTileGeometries.js +24 -24
  92. package/Build/Workers/createVectorTilePoints.js +13 -13
  93. package/Build/Workers/createVectorTilePolygons.js +22 -22
  94. package/Build/Workers/createVectorTilePolylines.js +14 -14
  95. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  96. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  97. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  98. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  99. package/Build/Workers/createWallGeometry.js +25 -25
  100. package/Build/Workers/createWallOutlineGeometry.js +24 -24
  101. package/Build/Workers/decodeDraco.js +10 -10
  102. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  103. package/Build/Workers/decodeI3S.js +12 -12
  104. package/Build/Workers/gaussianSplatSorter.js +4 -4
  105. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  106. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  107. package/Build/Workers/transcodeKTX2.js +6 -6
  108. package/Build/Workers/transferTypedArrayTest.js +1 -1
  109. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  110. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  111. package/Source/Core/BoundingSphere.js +1 -1
  112. package/Source/Core/Cartesian2.js +7 -5
  113. package/Source/Core/Cartesian3.js +8 -6
  114. package/Source/Core/Cartesian4.js +8 -6
  115. package/Source/Core/Color.js +5 -3
  116. package/Source/Core/DeveloperError.js +2 -1
  117. package/Source/Core/ITwinPlatform.js +1 -0
  118. package/Source/Core/Ion.js +1 -1
  119. package/Source/Core/S2Cell.js +2 -2
  120. package/Source/Core/TerrainMesh.js +10 -1
  121. package/Source/Core/TerrainPicker.js +1 -0
  122. package/Source/Core/WallGeometry.js +1 -1
  123. package/Source/Core/WallOutlineGeometry.js +1 -1
  124. package/Source/Core/assert.js +27 -0
  125. package/Source/Core/globalTypes.js +4 -0
  126. package/Source/DataSources/CzmlDataSource.js +9 -0
  127. package/Source/DataSources/PathGraphics.js +13 -0
  128. package/Source/DataSources/PathVisualizer.js +330 -18
  129. package/Source/DataSources/StaticGeometryColorBatch.js +7 -2
  130. package/Source/DataSources/StaticGeometryPerMaterialBatch.js +7 -2
  131. package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +3 -1
  132. package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +3 -1
  133. package/Source/Renderer/Context.js +1 -1
  134. package/Source/Renderer/RenderState.js +2 -2
  135. package/Source/Renderer/VertexArray.js +80 -0
  136. package/Source/Scene/ArcGisMapService.js +1 -1
  137. package/Source/Scene/BillboardCollection.js +65 -364
  138. package/Source/Scene/BufferPoint.js +148 -0
  139. package/Source/Scene/BufferPointCollection.js +135 -0
  140. package/Source/Scene/BufferPointMaterial.js +95 -0
  141. package/Source/Scene/BufferPolygon.js +516 -0
  142. package/Source/Scene/BufferPolygonCollection.js +368 -0
  143. package/Source/Scene/BufferPolygonMaterial.js +41 -0
  144. package/Source/Scene/BufferPolyline.js +185 -0
  145. package/Source/Scene/BufferPolylineCollection.js +136 -0
  146. package/Source/Scene/BufferPolylineMaterial.js +93 -0
  147. package/Source/Scene/BufferPrimitive.js +347 -0
  148. package/Source/Scene/BufferPrimitiveCollection.js +702 -0
  149. package/Source/Scene/BufferPrimitiveMaterial.js +140 -0
  150. package/Source/Scene/Cesium3DTileContent.js +5 -1
  151. package/Source/Scene/Cesium3DTileContentFactory.js +9 -0
  152. package/Source/Scene/Cesium3DTileStyle.js +22 -0
  153. package/Source/Scene/Cesium3DTileset.js +1 -0
  154. package/Source/Scene/ClippingPolygonCollection.js +270 -101
  155. package/Source/Scene/CubeMapPanorama.js +4 -4
  156. package/Source/Scene/GaussianSplat3DTileContent.js +40 -46
  157. package/Source/Scene/GaussianSplatPrimitive.js +413 -70
  158. package/Source/Scene/GetFeatureInfoFormat.js +3 -3
  159. package/Source/Scene/GltfLoader.js +215 -34
  160. package/Source/Scene/GltfSpzLoader.js +109 -0
  161. package/Source/Scene/ITwinData.js +1 -0
  162. package/Source/Scene/Label.js +32 -0
  163. package/Source/Scene/LabelCollection.js +14 -13
  164. package/Source/Scene/Material.js +2 -0
  165. package/Source/Scene/Megatexture.js +1 -0
  166. package/Source/Scene/MetadataClassProperty.js +24 -10
  167. package/Source/Scene/MetadataComponentType.js +115 -23
  168. package/Source/Scene/Model/CustomShaderPipelineStage.js +3 -1
  169. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +761 -263
  170. package/Source/Scene/Model/MaterialPipelineStage.js +147 -0
  171. package/Source/Scene/Model/MetadataPipelineStage.js +3 -3
  172. package/Source/Scene/Model/ModelDrawCommand.js +6 -0
  173. package/Source/Scene/Model/ModelReader.js +1 -1
  174. package/Source/Scene/Model/ModelUtility.js +3 -1
  175. package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +330 -0
  176. package/Source/Scene/ModelComponents.js +1632 -1542
  177. package/Source/Scene/PickedMetadataInfo.js +1 -0
  178. package/Source/Scene/ScreenSpaceCameraController.js +13 -0
  179. package/Source/Scene/SkyBox.js +17 -8
  180. package/Source/Scene/TileBoundingRegion.js +1 -1
  181. package/Source/Scene/TileBoundingS2Cell.js +1 -1
  182. package/Source/Scene/TileBoundingSphere.js +1 -1
  183. package/Source/Scene/TweenCollection.js +7 -0
  184. package/Source/Scene/VectorGltf3DTileContent.js +382 -0
  185. package/Source/Scene/VertexAttributeSemantic.js +14 -0
  186. package/Source/Scene/WebMapServiceImageryProvider.js +2 -2
  187. package/Source/Scene/WebMapTileServiceImageryProvider.js +366 -131
  188. package/Source/Scene/parseStructuralMetadata.js +97 -37
  189. package/Source/Scene/renderBufferPointCollection.js +334 -0
  190. package/Source/Scene/renderBufferPolygonCollection.js +386 -0
  191. package/Source/Scene/renderBufferPolylineCollection.js +529 -0
  192. package/Source/Shaders/BillboardCollectionFS.glsl +2 -77
  193. package/Source/Shaders/BillboardCollectionFS.js +2 -77
  194. package/Source/Shaders/BillboardCollectionVS.glsl +2 -60
  195. package/Source/Shaders/BillboardCollectionVS.js +2 -60
  196. package/Source/Shaders/BufferPointMaterialFS.glsl +27 -0
  197. package/Source/Shaders/BufferPointMaterialFS.js +29 -0
  198. package/Source/Shaders/BufferPointMaterialVS.glsl +48 -0
  199. package/Source/Shaders/BufferPointMaterialVS.js +50 -0
  200. package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
  201. package/Source/Shaders/BufferPolygonMaterialFS.js +15 -0
  202. package/Source/Shaders/BufferPolygonMaterialVS.glsl +30 -0
  203. package/Source/Shaders/BufferPolygonMaterialVS.js +32 -0
  204. package/Source/Shaders/BufferPolylineMaterialFS.glsl +13 -0
  205. package/Source/Shaders/BufferPolylineMaterialFS.js +15 -0
  206. package/Source/Shaders/BufferPolylineMaterialVS.glsl +49 -0
  207. package/Source/Shaders/BufferPolylineMaterialVS.js +51 -0
  208. package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +34 -48
  209. package/Source/Shaders/Model/EdgeVisibilityStageFS.js +34 -49
  210. package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +98 -0
  211. package/Source/Shaders/Model/EdgeVisibilityStageVS.js +100 -0
  212. package/Source/Shaders/Model/ModelFS.glsl +15 -0
  213. package/Source/Shaders/Model/ModelFS.js +15 -0
  214. package/Source/Shaders/Model/ModelVS.glsl +8 -0
  215. package/Source/Shaders/Model/ModelVS.js +8 -0
  216. package/Source/Shaders/PolygonSignedDistanceFS.glsl +64 -33
  217. package/Source/Shaders/PolygonSignedDistanceFS.js +64 -33
  218. package/Source/Shaders/PrimitiveGaussianSplatVS.glsl +9 -2
  219. package/Source/Shaders/PrimitiveGaussianSplatVS.js +9 -2
  220. package/Source/Shaders/Voxels/VoxelFS.glsl +1 -1
  221. package/Source/Shaders/Voxels/VoxelFS.js +1 -1
  222. package/Source/Workers/decodeDraco.js +3 -0
  223. package/Source/Workers/decodeI3S.js +5 -2
  224. package/index.d.ts +1007 -111
  225. package/index.js +394 -369
  226. package/package.json +2 -2
@@ -0,0 +1,49 @@
1
+ in vec3 positionHigh;
2
+ in vec3 positionLow;
3
+ in vec3 prevPositionHigh;
4
+ in vec3 prevPositionLow;
5
+ in vec3 nextPositionHigh;
6
+ in vec3 nextPositionLow;
7
+ in vec4 pickColor;
8
+ in vec4 showColorWidthAndTexCoord;
9
+
10
+ out vec4 v_pickColor;
11
+ out vec4 v_color;
12
+ out vec2 v_st;
13
+ out float v_width;
14
+ out float v_polylineAngle;
15
+
16
+ void main()
17
+ {
18
+ float show = showColorWidthAndTexCoord.x;
19
+ vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
20
+ float width = showColorWidthAndTexCoord.z;
21
+ float texCoord = showColorWidthAndTexCoord.w;
22
+
23
+ ///////////////////////////////////////////////////////////////////////////
24
+
25
+ bool usePrevious = texCoord == 1.0;
26
+ float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
27
+ float polylineAngle;
28
+
29
+ vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
30
+ vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
31
+ vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);
32
+
33
+ vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
34
+
35
+ ///////////////////////////////////////////////////////////////////////////
36
+
37
+ gl_Position = czm_viewportOrthographic * positionWC * show;
38
+
39
+ v_pickColor = pickColor / 255.0;
40
+
41
+ v_color = color;
42
+ v_color.a *= show;
43
+
44
+ v_st.s = texCoord;
45
+ v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
46
+
47
+ v_width = width;
48
+ v_polylineAngle = polylineAngle;
49
+ }
@@ -0,0 +1,51 @@
1
+ //This file is automatically rebuilt by the Cesium build process.
2
+ export default "in vec3 positionHigh;\n\
3
+ in vec3 positionLow;\n\
4
+ in vec3 prevPositionHigh;\n\
5
+ in vec3 prevPositionLow;\n\
6
+ in vec3 nextPositionHigh;\n\
7
+ in vec3 nextPositionLow;\n\
8
+ in vec4 pickColor;\n\
9
+ in vec4 showColorWidthAndTexCoord;\n\
10
+ \n\
11
+ out vec4 v_pickColor;\n\
12
+ out vec4 v_color;\n\
13
+ out vec2 v_st;\n\
14
+ out float v_width;\n\
15
+ out float v_polylineAngle;\n\
16
+ \n\
17
+ void main()\n\
18
+ {\n\
19
+ float show = showColorWidthAndTexCoord.x;\n\
20
+ vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);\n\
21
+ float width = showColorWidthAndTexCoord.z;\n\
22
+ float texCoord = showColorWidthAndTexCoord.w;\n\
23
+ \n\
24
+ ///////////////////////////////////////////////////////////////////////////\n\
25
+ \n\
26
+ bool usePrevious = texCoord == 1.0;\n\
27
+ float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;\n\
28
+ float polylineAngle;\n\
29
+ \n\
30
+ vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);\n\
31
+ vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);\n\
32
+ vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);\n\
33
+ \n\
34
+ vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);\n\
35
+ \n\
36
+ ///////////////////////////////////////////////////////////////////////////\n\
37
+ \n\
38
+ gl_Position = czm_viewportOrthographic * positionWC * show;\n\
39
+ \n\
40
+ v_pickColor = pickColor / 255.0;\n\
41
+ \n\
42
+ v_color = color;\n\
43
+ v_color.a *= show;\n\
44
+ \n\
45
+ v_st.s = texCoord;\n\
46
+ v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\
47
+ \n\
48
+ v_width = width;\n\
49
+ v_polylineAngle = polylineAngle;\n\
50
+ }\n\
51
+ ";
@@ -13,59 +13,45 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
13
13
  if (!u_isEdgePass) {
14
14
  return;
15
15
  }
16
-
16
+
17
17
  float edgeTypeInt = v_edgeType * 255.0;
18
-
19
- // Color code different edge types
20
- vec4 edgeColor = vec4(0.0);
21
-
22
- if (edgeTypeInt < 0.5) { // HIDDEN (0)
23
- edgeColor = vec4(0.0, 0.0, 0.0, 0.0); // Transparent for hidden edges
18
+
19
+ if (edgeTypeInt < 0.5) {
20
+ discard;
24
21
  }
25
- else if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // SILHOUETTE (1) - Conditional visibility
26
- // Proper silhouette detection using face normals
27
- vec3 normalA = normalize(v_faceNormalAView);
28
- vec3 normalB = normalize(v_faceNormalBView);
29
-
30
- // Calculate view direction using existing eye-space position varying (v_positionEC)
31
- vec3 viewDir = -normalize(v_positionEC);
32
-
33
- // Calculate dot products to determine triangle facing
34
- float dotA = dot(normalA, viewDir);
35
- float dotB = dot(normalB, viewDir);
36
-
37
- const float eps = 1e-3;
38
- bool frontA = dotA > eps;
39
- bool backA = dotA < -eps;
40
- bool frontB = dotB > eps;
41
- bool backB = dotB < -eps;
42
-
43
- // True silhouette: one triangle front-facing, other back-facing
44
- bool oppositeFacing = (frontA && backB) || (backA && frontB);
45
-
46
- // Exclude edges where both triangles are nearly grazing (perpendicular to view)
47
- // This handles the top-view cylinder case where both normals are ~horizontal
48
- bool bothNearGrazing = (abs(dotA) <= eps && abs(dotB) <= eps);
49
-
50
- if (!(oppositeFacing && !bothNearGrazing)) {
51
- discard; // Not a true silhouette edge
52
- } else {
53
- // True silhouette
54
- edgeColor = vec4(1.0, 0.0, 0.0, 1.0);
22
+
23
+ if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate
24
+ // Silhouette check done in vertex shader
25
+ // v_shouldDiscard will be > 0.5 if this edge should be discarded
26
+ if (v_shouldDiscard > 0.5) {
27
+ discard;
55
28
  }
56
29
  }
57
- else if (edgeTypeInt > 1.5 && edgeTypeInt < 2.5) { // HARD (2) - BRIGHT GREEN
58
- edgeColor = vec4(0.0, 1.0, 0.0, 1.0); // Extra bright green
59
- }
60
- else if (edgeTypeInt > 2.5 && edgeTypeInt < 3.5) { // REPEATED (3)
61
- edgeColor = vec4(0.0, 0.0, 1.0, 1.0);
62
- } else {
63
- edgeColor = vec4(0.0, 0.0, 0.0, 0.0);
30
+
31
+ vec4 finalColor = color;
32
+ #ifdef HAS_EDGE_COLOR_ATTRIBUTE
33
+ if (v_edgeColor.a >= 0.0) {
34
+ finalColor = v_edgeColor;
64
35
  }
36
+ #endif
65
37
 
66
- // Temporary color: white
67
- edgeColor = vec4(1.0, 1.0, 1.0, 1.0);
68
- color = edgeColor;
38
+ #ifdef HAS_LINE_PATTERN
39
+ // Pattern is 16-bit, each bit represents visibility at that position
40
+ const float maskLength = 16.0;
41
+
42
+ // Get the relative position within the dash from 0 to 1
43
+ float dashPosition = fract(v_lineCoord / maskLength);
44
+ // Figure out the mask index
45
+ float maskIndex = floor(dashPosition * maskLength);
46
+ // Test the bit mask
47
+ float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
48
+
49
+ // If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)
50
+ if (mod(maskTest, 2.0) < 1.0) {
51
+ discard;
52
+ }
53
+ #endif
54
+ color = finalColor;
69
55
 
70
56
  #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
71
57
  // Write edge metadata
@@ -80,4 +66,4 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
80
66
  out_edgeDepth = czm_packDepth(gl_FragCoord.z);
81
67
  #endif
82
68
  #endif
83
- }
69
+ }
@@ -14,59 +14,45 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)\n\
14
14
  if (!u_isEdgePass) {\n\
15
15
  return;\n\
16
16
  }\n\
17
- \n\
17
+ \n\
18
18
  float edgeTypeInt = v_edgeType * 255.0;\n\
19
- \n\
20
- // Color code different edge types\n\
21
- vec4 edgeColor = vec4(0.0);\n\
22
- \n\
23
- if (edgeTypeInt < 0.5) { // HIDDEN (0)\n\
24
- edgeColor = vec4(0.0, 0.0, 0.0, 0.0); // Transparent for hidden edges\n\
19
+ \n\
20
+ if (edgeTypeInt < 0.5) {\n\
21
+ discard;\n\
25
22
  }\n\
26
- else if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // SILHOUETTE (1) - Conditional visibility\n\
27
- // Proper silhouette detection using face normals\n\
28
- vec3 normalA = normalize(v_faceNormalAView);\n\
29
- vec3 normalB = normalize(v_faceNormalBView);\n\
30
- \n\
31
- // Calculate view direction using existing eye-space position varying (v_positionEC)\n\
32
- vec3 viewDir = -normalize(v_positionEC);\n\
33
- \n\
34
- // Calculate dot products to determine triangle facing\n\
35
- float dotA = dot(normalA, viewDir);\n\
36
- float dotB = dot(normalB, viewDir);\n\
37
- \n\
38
- const float eps = 1e-3;\n\
39
- bool frontA = dotA > eps;\n\
40
- bool backA = dotA < -eps;\n\
41
- bool frontB = dotB > eps;\n\
42
- bool backB = dotB < -eps;\n\
43
- \n\
44
- // True silhouette: one triangle front-facing, other back-facing\n\
45
- bool oppositeFacing = (frontA && backB) || (backA && frontB);\n\
46
- \n\
47
- // Exclude edges where both triangles are nearly grazing (perpendicular to view)\n\
48
- // This handles the top-view cylinder case where both normals are ~horizontal\n\
49
- bool bothNearGrazing = (abs(dotA) <= eps && abs(dotB) <= eps);\n\
50
- \n\
51
- if (!(oppositeFacing && !bothNearGrazing)) {\n\
52
- discard; // Not a true silhouette edge\n\
53
- } else {\n\
54
- // True silhouette\n\
55
- edgeColor = vec4(1.0, 0.0, 0.0, 1.0);\n\
23
+ \n\
24
+ if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate\n\
25
+ // Silhouette check done in vertex shader\n\
26
+ // v_shouldDiscard will be > 0.5 if this edge should be discarded\n\
27
+ if (v_shouldDiscard > 0.5) {\n\
28
+ discard;\n\
56
29
  }\n\
57
30
  }\n\
58
- else if (edgeTypeInt > 1.5 && edgeTypeInt < 2.5) { // HARD (2) - BRIGHT GREEN\n\
59
- edgeColor = vec4(0.0, 1.0, 0.0, 1.0); // Extra bright green\n\
60
- }\n\
61
- else if (edgeTypeInt > 2.5 && edgeTypeInt < 3.5) { // REPEATED (3)\n\
62
- edgeColor = vec4(0.0, 0.0, 1.0, 1.0);\n\
63
- } else {\n\
64
- edgeColor = vec4(0.0, 0.0, 0.0, 0.0);\n\
31
+ \n\
32
+ vec4 finalColor = color;\n\
33
+ #ifdef HAS_EDGE_COLOR_ATTRIBUTE\n\
34
+ if (v_edgeColor.a >= 0.0) {\n\
35
+ finalColor = v_edgeColor;\n\
65
36
  }\n\
37
+ #endif\n\
66
38
  \n\
67
- // Temporary color: white\n\
68
- edgeColor = vec4(1.0, 1.0, 1.0, 1.0);\n\
69
- color = edgeColor;\n\
39
+ #ifdef HAS_LINE_PATTERN\n\
40
+ // Pattern is 16-bit, each bit represents visibility at that position\n\
41
+ const float maskLength = 16.0;\n\
42
+ \n\
43
+ // Get the relative position within the dash from 0 to 1\n\
44
+ float dashPosition = fract(v_lineCoord / maskLength);\n\
45
+ // Figure out the mask index\n\
46
+ float maskIndex = floor(dashPosition * maskLength);\n\
47
+ // Test the bit mask\n\
48
+ float maskTest = floor(u_linePattern / pow(2.0, maskIndex));\n\
49
+ \n\
50
+ // If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)\n\
51
+ if (mod(maskTest, 2.0) < 1.0) {\n\
52
+ discard;\n\
53
+ }\n\
54
+ #endif\n\
55
+ color = finalColor;\n\
70
56
  \n\
71
57
  #if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)\n\
72
58
  // Write edge metadata\n\
@@ -81,5 +67,4 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)\n\
81
67
  out_edgeDepth = czm_packDepth(gl_FragCoord.z);\n\
82
68
  #endif\n\
83
69
  #endif\n\
84
- }\n\
85
- ";
70
+ }";
@@ -0,0 +1,98 @@
1
+ #ifdef HAS_EDGE_VISIBILITY
2
+ void edgeVisibilityStageVS() {
3
+ if (!u_isEdgePass) {
4
+ return;
5
+ }
6
+
7
+ v_edgeType = a_edgeType;
8
+ v_silhouetteNormalView = czm_normal * a_silhouetteNormal;
9
+ v_faceNormalAView = czm_normal * a_faceNormalA;
10
+ v_faceNormalBView = czm_normal * a_faceNormalB;
11
+ v_edgeOffset = a_edgeOffset;
12
+
13
+ // Silhouette detection: check both endpoints of the edge
14
+ v_shouldDiscard = 0.0;
15
+ float edgeTypeInt = a_edgeType * 255.0;
16
+ if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
17
+ vec3 normalA = normalize(v_faceNormalAView);
18
+ vec3 normalB = normalize(v_faceNormalBView);
19
+ const float perpTol = 2.5e-4;
20
+
21
+ // Check at current vertex (first endpoint)
22
+ vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
23
+ vec3 toEye1 = normalize(-currentPosEC.xyz);
24
+ float dotA1 = dot(normalA, toEye1);
25
+ float dotB1 = dot(normalB, toEye1);
26
+
27
+ // Check at other vertex (second endpoint)
28
+ vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
29
+ vec3 toEye2 = normalize(-otherPosEC.xyz);
30
+ float dotA2 = dot(normalA, toEye2);
31
+ float dotB2 = dot(normalB, toEye2);
32
+
33
+ // Discard if EITHER endpoint is non-silhouette
34
+ if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
35
+ v_shouldDiscard = 1.0;
36
+ }
37
+ }
38
+
39
+ #ifdef HAS_EDGE_FEATURE_ID
40
+ v_featureId_0 = a_edgeFeatureId;
41
+ #endif
42
+
43
+ #ifdef HAS_EDGE_COLOR_ATTRIBUTE
44
+ v_edgeColor = a_edgeColor;
45
+ #endif
46
+
47
+ #ifdef HAS_LINE_PATTERN
48
+ #ifdef HAS_EDGE_CUMULATIVE_DISTANCE
49
+ v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
50
+ #else
51
+ vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
52
+ vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;
53
+
54
+ vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
55
+ vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
56
+ vec2 windowDir = otherScreen - currentScreen;
57
+
58
+ const float textureCoordinateBase = 8192.0;
59
+ if (abs(windowDir.x) > abs(windowDir.y)) {
60
+ v_lineCoord = textureCoordinateBase + currentScreen.x;
61
+ } else {
62
+ v_lineCoord = textureCoordinateBase + currentScreen.y;
63
+ }
64
+ #endif
65
+ #endif
66
+
67
+ // Expand vertex to form quad
68
+ vec4 posClip = gl_Position;
69
+
70
+ if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
71
+ vec4 currentClip = posClip;
72
+ vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
73
+
74
+ vec2 currentNDC = currentClip.xy / currentClip.w;
75
+ vec2 otherNDC = otherClip.xy / otherClip.w;
76
+
77
+ vec2 edgeDirNDC = otherNDC - currentNDC;
78
+
79
+ // Ensure consistent edge direction
80
+ if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
81
+ edgeDirNDC = -edgeDirNDC;
82
+ }
83
+
84
+ edgeDirNDC = normalize(edgeDirNDC);
85
+ vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);
86
+
87
+ // Convert line width from pixels to clip space
88
+ float lineWidthPixels = u_lineWidth;
89
+ vec2 viewportSize = czm_viewport.zw;
90
+ vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
91
+ vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;
92
+
93
+ posClip.xy += offsetClip;
94
+ }
95
+
96
+ gl_Position = posClip;
97
+ }
98
+ #endif
@@ -0,0 +1,100 @@
1
+ //This file is automatically rebuilt by the Cesium build process.
2
+ export default "#ifdef HAS_EDGE_VISIBILITY\n\
3
+ void edgeVisibilityStageVS() {\n\
4
+ if (!u_isEdgePass) {\n\
5
+ return;\n\
6
+ }\n\
7
+ \n\
8
+ v_edgeType = a_edgeType;\n\
9
+ v_silhouetteNormalView = czm_normal * a_silhouetteNormal;\n\
10
+ v_faceNormalAView = czm_normal * a_faceNormalA;\n\
11
+ v_faceNormalBView = czm_normal * a_faceNormalB;\n\
12
+ v_edgeOffset = a_edgeOffset;\n\
13
+ \n\
14
+ // Silhouette detection: check both endpoints of the edge\n\
15
+ v_shouldDiscard = 0.0;\n\
16
+ float edgeTypeInt = a_edgeType * 255.0;\n\
17
+ if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {\n\
18
+ vec3 normalA = normalize(v_faceNormalAView);\n\
19
+ vec3 normalB = normalize(v_faceNormalBView);\n\
20
+ const float perpTol = 2.5e-4;\n\
21
+ \n\
22
+ // Check at current vertex (first endpoint)\n\
23
+ vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);\n\
24
+ vec3 toEye1 = normalize(-currentPosEC.xyz);\n\
25
+ float dotA1 = dot(normalA, toEye1);\n\
26
+ float dotB1 = dot(normalB, toEye1);\n\
27
+ \n\
28
+ // Check at other vertex (second endpoint)\n\
29
+ vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);\n\
30
+ vec3 toEye2 = normalize(-otherPosEC.xyz);\n\
31
+ float dotA2 = dot(normalA, toEye2);\n\
32
+ float dotB2 = dot(normalB, toEye2);\n\
33
+ \n\
34
+ // Discard if EITHER endpoint is non-silhouette\n\
35
+ if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {\n\
36
+ v_shouldDiscard = 1.0;\n\
37
+ }\n\
38
+ }\n\
39
+ \n\
40
+ #ifdef HAS_EDGE_FEATURE_ID\n\
41
+ v_featureId_0 = a_edgeFeatureId;\n\
42
+ #endif\n\
43
+ \n\
44
+ #ifdef HAS_EDGE_COLOR_ATTRIBUTE\n\
45
+ v_edgeColor = a_edgeColor;\n\
46
+ #endif\n\
47
+ \n\
48
+ #ifdef HAS_LINE_PATTERN\n\
49
+ #ifdef HAS_EDGE_CUMULATIVE_DISTANCE\n\
50
+ v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;\n\
51
+ #else\n\
52
+ vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);\n\
53
+ vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;\n\
54
+ \n\
55
+ vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);\n\
56
+ vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;\n\
57
+ vec2 windowDir = otherScreen - currentScreen;\n\
58
+ \n\
59
+ const float textureCoordinateBase = 8192.0;\n\
60
+ if (abs(windowDir.x) > abs(windowDir.y)) {\n\
61
+ v_lineCoord = textureCoordinateBase + currentScreen.x;\n\
62
+ } else {\n\
63
+ v_lineCoord = textureCoordinateBase + currentScreen.y;\n\
64
+ }\n\
65
+ #endif\n\
66
+ #endif\n\
67
+ \n\
68
+ // Expand vertex to form quad\n\
69
+ vec4 posClip = gl_Position;\n\
70
+ \n\
71
+ if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {\n\
72
+ vec4 currentClip = posClip;\n\
73
+ vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);\n\
74
+ \n\
75
+ vec2 currentNDC = currentClip.xy / currentClip.w;\n\
76
+ vec2 otherNDC = otherClip.xy / otherClip.w;\n\
77
+ \n\
78
+ vec2 edgeDirNDC = otherNDC - currentNDC;\n\
79
+ \n\
80
+ // Ensure consistent edge direction\n\
81
+ if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {\n\
82
+ edgeDirNDC = -edgeDirNDC;\n\
83
+ }\n\
84
+ \n\
85
+ edgeDirNDC = normalize(edgeDirNDC);\n\
86
+ vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);\n\
87
+ \n\
88
+ // Convert line width from pixels to clip space\n\
89
+ float lineWidthPixels = u_lineWidth;\n\
90
+ vec2 viewportSize = czm_viewport.zw;\n\
91
+ vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;\n\
92
+ vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;\n\
93
+ \n\
94
+ posClip.xy += offsetClip;\n\
95
+ }\n\
96
+ \n\
97
+ gl_Position = posClip;\n\
98
+ }\n\
99
+ #endif\n\
100
+ ";
@@ -25,6 +25,19 @@ vec4 handleAlpha(vec3 color, float alpha)
25
25
  return vec4(color, alpha);
26
26
  }
27
27
 
28
+ void lineStyleStage()
29
+ {
30
+ #if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)
31
+ const float maskLength = 16.0;
32
+ float dashPosition = fract(v_lineCoord / maskLength);
33
+ float maskIndex = floor(dashPosition * maskLength);
34
+ float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
35
+ if (mod(maskTest, 2.0) < 1.0) {
36
+ discard;
37
+ }
38
+ #endif
39
+ }
40
+
28
41
  SelectedFeature selectedFeature;
29
42
 
30
43
  void main()
@@ -107,6 +120,8 @@ void main()
107
120
  // When picking metadata END
108
121
  //========================================================================
109
122
 
123
+ lineStyleStage();
124
+
110
125
  #ifdef HAS_CLIPPING_PLANES
111
126
  modelClippingPlanesStage(color);
112
127
  #endif
@@ -26,6 +26,19 @@ vec4 handleAlpha(vec3 color, float alpha)\n\
26
26
  return vec4(color, alpha);\n\
27
27
  }\n\
28
28
  \n\
29
+ void lineStyleStage()\n\
30
+ {\n\
31
+ #if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)\n\
32
+ const float maskLength = 16.0;\n\
33
+ float dashPosition = fract(v_lineCoord / maskLength);\n\
34
+ float maskIndex = floor(dashPosition * maskLength);\n\
35
+ float maskTest = floor(u_linePattern / pow(2.0, maskIndex));\n\
36
+ if (mod(maskTest, 2.0) < 1.0) {\n\
37
+ discard;\n\
38
+ }\n\
39
+ #endif\n\
40
+ }\n\
41
+ \n\
29
42
  SelectedFeature selectedFeature;\n\
30
43
  \n\
31
44
  void main()\n\
@@ -107,6 +120,8 @@ void main()\n\
107
120
  #endif\n\
108
121
  // When picking metadata END\n\
109
122
  //========================================================================\n\
123
+ \n\
124
+ lineStyleStage();\n\
110
125
  \n\
111
126
  #ifdef HAS_CLIPPING_PLANES\n\
112
127
  modelClippingPlanesStage(color);\n\
@@ -110,6 +110,10 @@ void main()
110
110
  // This returns the value that will be assigned to gl_Position.
111
111
  vec4 positionClip = geometryStage(attributes, modelView, normal);
112
112
 
113
+ #if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)
114
+ lineStyleStageVS(attributes);
115
+ #endif
116
+
113
117
  // This must go after the geometry stage as it needs v_positionWC
114
118
  #ifdef HAS_ATMOSPHERE
115
119
  atmosphereStage(attributes);
@@ -157,6 +161,10 @@ void main()
157
161
  // We will discard points with v_pointCloudShow == 0 in the fragment shader.
158
162
  gl_Position = positionClip;
159
163
 
164
+ #ifdef HAS_EDGE_VISIBILITY
165
+ edgeVisibilityStageVS();
166
+ #endif
167
+
160
168
  #ifdef HAS_POINT_CLOUD_SHOW_STYLE
161
169
  v_pointCloudShow = show;
162
170
  #endif
@@ -110,6 +110,10 @@ void main()\n\
110
110
  // Compute the final position in each coordinate system needed.\n\
111
111
  // This returns the value that will be assigned to gl_Position.\n\
112
112
  vec4 positionClip = geometryStage(attributes, modelView, normal);\n\
113
+ \n\
114
+ #if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)\n\
115
+ lineStyleStageVS(attributes);\n\
116
+ #endif\n\
113
117
  \n\
114
118
  // This must go after the geometry stage as it needs v_positionWC\n\
115
119
  #ifdef HAS_ATMOSPHERE\n\
@@ -157,6 +161,10 @@ void main()\n\
157
161
  //\n\
158
162
  // We will discard points with v_pointCloudShow == 0 in the fragment shader.\n\
159
163
  gl_Position = positionClip;\n\
164
+ \n\
165
+ #ifdef HAS_EDGE_VISIBILITY\n\
166
+ edgeVisibilityStageVS();\n\
167
+ #endif\n\
160
168
  \n\
161
169
  #ifdef HAS_POINT_CLOUD_SHOW_STYLE\n\
162
170
  v_pointCloudShow = show;\n\