@cesium/engine 17.0.0 → 18.0.1-splats.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 (188) hide show
  1. package/Build/ThirdParty/Workers/z-worker-pako.js +1 -1
  2. package/Build/Workers/{chunk-UC7KH56Y.js → chunk-2AXKROJA.js} +5 -5
  3. package/Build/Workers/{chunk-IKDQX7DY.js → chunk-2J5ZZ7CY.js} +4 -4
  4. package/Build/Workers/{chunk-4TIR5UPL.js → chunk-2SYY3UBI.js} +1 -1
  5. package/Build/Workers/{chunk-CC2WKHIW.js → chunk-2WKW3BEB.js} +6 -6
  6. package/Build/Workers/{chunk-CBFJVM6I.js → chunk-2ZO6BCHN.js} +11 -11
  7. package/Build/Workers/{chunk-7PHT4JHA.js → chunk-3UKG5X7F.js} +12 -12
  8. package/Build/Workers/{chunk-PM4Q36WX.js → chunk-4GYIDPXP.js} +9 -9
  9. package/Build/Workers/{chunk-QUFN3GEO.js → chunk-6EP7ED36.js} +3 -3
  10. package/Build/Workers/{chunk-QJTIOB2Z.js → chunk-6QOBORNG.js} +6 -6
  11. package/Build/Workers/{chunk-YE6MDFDA.js → chunk-6WWHK2ER.js} +14 -14
  12. package/Build/Workers/{chunk-RX65FA7X.js → chunk-6Y6TVYHS.js} +7 -7
  13. package/Build/Workers/{chunk-P2N5IDWU.js → chunk-744VWE2U.js} +13 -13
  14. package/Build/Workers/{chunk-LVGYWPEX.js → chunk-7PQ52XCW.js} +4 -4
  15. package/Build/Workers/{chunk-PS3OKVOQ.js → chunk-A5UFJW2M.js} +12 -12
  16. package/Build/Workers/{chunk-CAKU6ZPR.js → chunk-AQKVFTWV.js} +8 -8
  17. package/Build/Workers/{chunk-236N6BJN.js → chunk-BKTEHJFD.js} +2 -2
  18. package/Build/Workers/{chunk-5PC577K7.js → chunk-CQXYKPAW.js} +16 -16
  19. package/Build/Workers/{chunk-DRMXU674.js → chunk-DI7PHKC6.js} +5 -5
  20. package/Build/Workers/{chunk-CQMXZF4A.js → chunk-DKKIQS6F.js} +6 -6
  21. package/Build/Workers/{chunk-J2HTPGC7.js → chunk-DTVWE5YL.js} +2 -2
  22. package/Build/Workers/{chunk-SSLK4U3V.js → chunk-ERPS2WZC.js} +4 -4
  23. package/Build/Workers/chunk-EYMZ5FSQ.js +280 -0
  24. package/Build/Workers/{chunk-LPGOAMYH.js → chunk-F43TQW5B.js} +2 -2
  25. package/Build/Workers/{chunk-5RPUEFSA.js → chunk-FOMRN6II.js} +6 -6
  26. package/Build/Workers/{chunk-2BJXFXD7.js → chunk-FOTXJYKS.js} +4 -4
  27. package/Build/Workers/{chunk-VXAKU6EV.js → chunk-G2Y7EA4W.js} +5 -5
  28. package/Build/Workers/{chunk-KE45DUDH.js → chunk-GY4E4ZP6.js} +10 -10
  29. package/Build/Workers/{chunk-NZSBSY5K.js → chunk-HDG3VHYL.js} +2 -2
  30. package/Build/Workers/{chunk-WP3IJYLC.js → chunk-HOEUXPBL.js} +9 -9
  31. package/Build/Workers/{chunk-5YEFZMMM.js → chunk-IWDYVJ56.js} +12 -12
  32. package/Build/Workers/{chunk-SQKTLDSD.js → chunk-JA4KPQJL.js} +12 -12
  33. package/Build/Workers/{chunk-MAIKDIBS.js → chunk-JZZQEZMA.js} +6 -6
  34. package/Build/Workers/{chunk-77MDEA47.js → chunk-KPLU3WDY.js} +5 -5
  35. package/Build/Workers/{chunk-E7SMO47Q.js → chunk-LHM6V4D6.js} +5 -5
  36. package/Build/Workers/{chunk-HBNWBMAM.js → chunk-LMTGCD6P.js} +1 -1
  37. package/Build/Workers/{chunk-XYGBWBD5.js → chunk-LWZOYSSF.js} +1 -1
  38. package/Build/Workers/{chunk-OBHLT34A.js → chunk-M6U7SV4T.js} +7 -7
  39. package/Build/Workers/{chunk-MS5NWDHH.js → chunk-O25M56DO.js} +2 -2
  40. package/Build/Workers/{chunk-UX5JWAC7.js → chunk-OE2WXO2Z.js} +10 -10
  41. package/Build/Workers/{chunk-C5DCX2YQ.js → chunk-PFD462OE.js} +6 -6
  42. package/Build/Workers/{chunk-37PA7GZW.js → chunk-PPI33PXH.js} +7 -7
  43. package/Build/Workers/{chunk-4BGKMM7J.js → chunk-PRQQHLUB.js} +1 -1
  44. package/Build/Workers/{chunk-IFIS4CVK.js → chunk-RTUZ7MJB.js} +2 -2
  45. package/Build/Workers/{chunk-G6JUXZUO.js → chunk-S6QBTP5U.js} +4 -4
  46. package/Build/Workers/{chunk-UFV3YUIN.js → chunk-SMFCIGM3.js} +5 -5
  47. package/Build/Workers/{chunk-P57PR3WM.js → chunk-TC3LEKFJ.js} +5 -5
  48. package/Build/Workers/{chunk-7IIMO7ZZ.js → chunk-UTLYCPFY.js} +16 -16
  49. package/Build/Workers/{chunk-HGEGZ67N.js → chunk-V7LEBY53.js} +6 -6
  50. package/Build/Workers/{chunk-GO3RZX2R.js → chunk-VE3UKRDB.js} +9 -9
  51. package/Build/Workers/{chunk-ZTBZMRQT.js → chunk-W3FBD4FE.js} +8 -8
  52. package/Build/Workers/{chunk-K5JTWJPE.js → chunk-YRR6CJGG.js} +4 -4
  53. package/Build/Workers/{chunk-UZ6KXWCA.js → chunk-ZVTKMLU6.js} +4 -4
  54. package/Build/Workers/combineGeometry.js +21 -21
  55. package/Build/Workers/createBoxGeometry.js +15 -15
  56. package/Build/Workers/createBoxOutlineGeometry.js +13 -13
  57. package/Build/Workers/createCircleGeometry.js +23 -23
  58. package/Build/Workers/createCircleOutlineGeometry.js +16 -16
  59. package/Build/Workers/createCoplanarPolygonGeometry.js +30 -30
  60. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
  61. package/Build/Workers/createCorridorGeometry.js +26 -26
  62. package/Build/Workers/createCorridorOutlineGeometry.js +25 -25
  63. package/Build/Workers/createCylinderGeometry.js +17 -17
  64. package/Build/Workers/createCylinderOutlineGeometry.js +15 -15
  65. package/Build/Workers/createEllipseGeometry.js +23 -23
  66. package/Build/Workers/createEllipseOutlineGeometry.js +16 -16
  67. package/Build/Workers/createEllipsoidGeometry.js +16 -16
  68. package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -15
  69. package/Build/Workers/createFrustumGeometry.js +15 -15
  70. package/Build/Workers/createFrustumOutlineGeometry.js +15 -15
  71. package/Build/Workers/createGeometry.js +23 -21
  72. package/Build/Workers/createGroundPolylineGeometry.js +19 -19
  73. package/Build/Workers/createPlaneGeometry.js +13 -13
  74. package/Build/Workers/createPlaneOutlineGeometry.js +12 -12
  75. package/Build/Workers/createPolygonGeometry.js +29 -29
  76. package/Build/Workers/createPolygonOutlineGeometry.js +27 -27
  77. package/Build/Workers/createPolylineGeometry.js +22 -22
  78. package/Build/Workers/createPolylineVolumeGeometry.js +28 -28
  79. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
  80. package/Build/Workers/createRectangleGeometry.js +24 -24
  81. package/Build/Workers/createRectangleOutlineGeometry.js +17 -17
  82. package/Build/Workers/createSimplePolylineGeometry.js +20 -20
  83. package/Build/Workers/createSphereGeometry.js +16 -16
  84. package/Build/Workers/createSphereOutlineGeometry.js +15 -15
  85. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  86. package/Build/Workers/createVectorTileClampedPolylines.js +12 -12
  87. package/Build/Workers/createVectorTileGeometries.js +21 -21
  88. package/Build/Workers/createVectorTilePoints.js +11 -11
  89. package/Build/Workers/createVectorTilePolygons.js +19 -19
  90. package/Build/Workers/createVectorTilePolylines.js +12 -12
  91. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +19 -19
  92. package/Build/Workers/createVerticesFromHeightmap.js +19 -19
  93. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +16 -16
  94. package/Build/Workers/createWallGeometry.js +21 -21
  95. package/Build/Workers/createWallOutlineGeometry.js +20 -20
  96. package/Build/Workers/decodeDraco.js +10 -10
  97. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  98. package/Build/Workers/decodeI3S.js +9 -9
  99. package/Build/Workers/gaussianSplatSorter.js +62 -0
  100. package/Build/Workers/gaussianSplatTextureGenerator.js +68 -0
  101. package/Build/Workers/transcodeKTX2.js +78 -7
  102. package/Build/Workers/transferTypedArrayTest.js +1 -1
  103. package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
  104. package/Source/Core/Ion.js +1 -1
  105. package/Source/Core/PixelFormat.js +98 -0
  106. package/Source/Renderer/Context.js +2 -0
  107. package/Source/Renderer/Pass.js +3 -2
  108. package/Source/Renderer/Texture.js +1 -0
  109. package/Source/Renderer/Texture3D.js +568 -0
  110. package/Source/Renderer/VertexArray.js +33 -8
  111. package/Source/Renderer/createUniform.js +3 -0
  112. package/Source/Renderer/createUniformArray.js +1 -0
  113. package/Source/Scene/ArcGisMapService.js +1 -1
  114. package/Source/Scene/Cesium3DTileContentFactory.js +23 -0
  115. package/Source/Scene/Cesium3DTileset.js +197 -2
  116. package/Source/Scene/GaussianSplat3DTileContent.js +504 -0
  117. package/Source/Scene/GaussianSplatPrimitive.js +932 -0
  118. package/Source/Scene/GaussianSplatRenderResources.js +81 -0
  119. package/Source/Scene/GaussianSplatSorter.js +73 -0
  120. package/Source/Scene/GaussianSplatTextureGenerator.js +64 -0
  121. package/Source/Scene/GlobeSurfaceShaderSet.js +4 -5
  122. package/Source/Scene/GltfLoader.js +82 -4
  123. package/Source/Scene/GltfSpzLoader.js +222 -0
  124. package/Source/Scene/GltfVertexBufferLoader.js +98 -3
  125. package/Source/Scene/ImageryLayer.js +19 -4
  126. package/Source/Scene/ImageryLayerCollection.js +3 -2
  127. package/Source/Scene/Model/CartesianRectangle.js +108 -0
  128. package/Source/Scene/Model/ImageryConfiguration.js +25 -0
  129. package/Source/Scene/Model/ImageryCoverage.js +488 -0
  130. package/Source/Scene/Model/ImageryFlags.js +31 -0
  131. package/Source/Scene/Model/ImageryInput.js +60 -0
  132. package/Source/Scene/Model/ImageryPipelineStage.js +1040 -0
  133. package/Source/Scene/Model/MappedPositions.js +84 -0
  134. package/Source/Scene/Model/Model.js +38 -0
  135. package/Source/Scene/Model/ModelImagery.js +403 -0
  136. package/Source/Scene/Model/ModelImageryMapping.js +489 -0
  137. package/Source/Scene/Model/ModelPrimitiveImagery.js +972 -0
  138. package/Source/Scene/Model/ModelReader.js +810 -0
  139. package/Source/Scene/Model/ModelRenderResources.js +13 -0
  140. package/Source/Scene/Model/ModelRuntimePrimitive.js +20 -0
  141. package/Source/Scene/Model/ModelSceneGraph.js +133 -27
  142. package/Source/Scene/Model/ModelUtility.js +2 -0
  143. package/Source/Scene/Model/NodeRenderResources.js +10 -0
  144. package/Source/Scene/ModelComponents.js +10 -0
  145. package/Source/Scene/PrimitiveLoadPlan.js +59 -0
  146. package/Source/Scene/ResourceCache.js +60 -3
  147. package/Source/Scene/ResourceCacheKey.js +39 -1
  148. package/Source/Scene/Scene.js +32 -1
  149. package/Source/Scene/VertexAttributeSemantic.js +30 -0
  150. package/Source/Scene/VoxelPrimitive.js +22 -37
  151. package/Source/Scene/VoxelRenderResources.js +1 -1
  152. package/Source/Scene/processVoxelProperties.js +41 -100
  153. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +9 -0
  154. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +11 -0
  155. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
  156. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  157. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
  158. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +0 -1
  159. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +0 -1
  160. package/Source/Shaders/GlobeFS.glsl +22 -0
  161. package/Source/Shaders/GlobeFS.js +22 -0
  162. package/Source/Shaders/Model/MaterialStageFS.glsl +4 -0
  163. package/Source/Shaders/Model/MaterialStageFS.js +4 -0
  164. package/Source/Shaders/Model/ModelFS.glsl +3 -1
  165. package/Source/Shaders/Model/ModelFS.js +3 -1
  166. package/Source/Shaders/Model/ModelVS.glsl +5 -1
  167. package/Source/Shaders/Model/ModelVS.js +5 -1
  168. package/Source/Shaders/Model/PointCloudStylingStageVS.glsl +1 -1
  169. package/Source/Shaders/Model/PointCloudStylingStageVS.js +2 -1
  170. package/Source/Shaders/PrimitiveGaussianSplatFS.glsl +18 -0
  171. package/Source/Shaders/PrimitiveGaussianSplatFS.js +20 -0
  172. package/Source/Shaders/PrimitiveGaussianSplatVS.glsl +108 -0
  173. package/Source/Shaders/PrimitiveGaussianSplatVS.js +109 -0
  174. package/Source/Shaders/Voxels/IntersectDepth.glsl +10 -3
  175. package/Source/Shaders/Voxels/IntersectDepth.js +10 -3
  176. package/Source/Shaders/Voxels/Intersection.glsl +1 -3
  177. package/Source/Shaders/Voxels/Intersection.js +1 -3
  178. package/Source/Shaders/Voxels/IntersectionUtils.glsl +1 -0
  179. package/Source/Shaders/Voxels/IntersectionUtils.js +1 -0
  180. package/Source/Shaders/Voxels/VoxelFS.glsl +37 -24
  181. package/Source/Shaders/Voxels/VoxelFS.js +37 -24
  182. package/Source/ThirdParty/Workers/z-worker-pako.js +1 -1
  183. package/Source/ThirdParty/wasm_splats_bg.wasm +0 -0
  184. package/Source/Workers/gaussianSplatSorter.js +34 -0
  185. package/Source/Workers/gaussianSplatTextureGenerator.js +39 -0
  186. package/index.d.ts +66 -2
  187. package/index.js +101 -80
  188. package/package.json +6 -4
@@ -73,6 +73,20 @@ const VertexAttributeSemantic = {
73
73
  * @constant
74
74
  */
75
75
  FEATURE_ID: "_FEATURE_ID",
76
+ /**
77
+ * Gaussian Splat Scale
78
+ *
79
+ * @type {string}
80
+ * @constant
81
+ */
82
+ SCALE: "_SCALE",
83
+ /**
84
+ * Gaussian Splat Rotation
85
+ *
86
+ * @type {string}
87
+ * @constant
88
+ */
89
+ ROTATION: "_ROTATION",
76
90
  };
77
91
 
78
92
  function semanticToVariableName(semantic) {
@@ -93,6 +107,10 @@ function semanticToVariableName(semantic) {
93
107
  return "weights";
94
108
  case VertexAttributeSemantic.FEATURE_ID:
95
109
  return "featureId";
110
+ case VertexAttributeSemantic.SCALE:
111
+ return "scale";
112
+ case VertexAttributeSemantic.ROTATION:
113
+ return "rotation";
96
114
  //>>includeStart('debug', pragmas.debug);
97
115
  default:
98
116
  throw new DeveloperError("semantic is not a valid value.");
@@ -124,6 +142,8 @@ VertexAttributeSemantic.hasSetIndex = function (semantic) {
124
142
  case VertexAttributeSemantic.JOINTS:
125
143
  case VertexAttributeSemantic.WEIGHTS:
126
144
  case VertexAttributeSemantic.FEATURE_ID:
145
+ case VertexAttributeSemantic.SCALE:
146
+ case VertexAttributeSemantic.ROTATION:
127
147
  return true;
128
148
  //>>includeStart('debug', pragmas.debug);
129
149
  default:
@@ -172,6 +192,10 @@ VertexAttributeSemantic.fromGltfSemantic = function (gltfSemantic) {
172
192
  return VertexAttributeSemantic.WEIGHTS;
173
193
  case "_FEATURE_ID":
174
194
  return VertexAttributeSemantic.FEATURE_ID;
195
+ case "_SCALE":
196
+ return VertexAttributeSemantic.SCALE;
197
+ case "_ROTATION":
198
+ return VertexAttributeSemantic.ROTATION;
175
199
  }
176
200
 
177
201
  return undefined;
@@ -241,6 +265,12 @@ VertexAttributeSemantic.getGlslType = function (semantic) {
241
265
  return "vec4";
242
266
  case VertexAttributeSemantic.FEATURE_ID:
243
267
  return "int";
268
+ case VertexAttributeSemantic.SCALE:
269
+ return "vec3";
270
+ case VertexAttributeSemantic.ROTATION:
271
+ return "vec4";
272
+ case VertexAttributeSemantic.OPACITY:
273
+ return "float";
244
274
  //>>includeStart('debug', pragmas.debug);
245
275
  default:
246
276
  throw new DeveloperError("semantic is not a valid value.");
@@ -45,6 +45,7 @@ import VoxelMetadataOrder from "./VoxelMetadataOrder.js";
45
45
  * @see VoxelProvider
46
46
  * @see Cesium3DTilesVoxelProvider
47
47
  * @see VoxelShapeType
48
+ * @see {@link https://github.com/CesiumGS/cesium/tree/main/Documentation/CustomShaderGuide|Custom Shader Guide}
48
49
  *
49
50
  * @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
50
51
  */
@@ -339,22 +340,22 @@ function VoxelPrimitive(options) {
339
340
  this._transformPositionWorldToUv = new Matrix4();
340
341
 
341
342
  /**
342
- * @type {Matrix4}
343
+ * @type {Matrix3}
343
344
  * @private
344
345
  */
345
- this._transformPositionUvToWorld = new Matrix4();
346
+ this._transformDirectionWorldToUv = new Matrix3();
346
347
 
347
348
  /**
348
- * @type {Matrix3}
349
+ * @type {Matrix4}
349
350
  * @private
350
351
  */
351
- this._transformDirectionWorldToLocal = new Matrix3();
352
+ this._transformPositionUvToWorld = new Matrix4();
352
353
 
353
354
  /**
354
355
  * @type {Matrix3}
355
356
  * @private
356
357
  */
357
- this._transformNormalLocalToWorld = new Matrix3();
358
+ this._transformDirectionWorldToLocal = new Matrix3();
358
359
 
359
360
  // Rendering
360
361
  /**
@@ -442,8 +443,8 @@ function VoxelPrimitive(options) {
442
443
  transformPositionViewToUv: new Matrix4(),
443
444
  transformPositionUvToView: new Matrix4(),
444
445
  transformDirectionViewToLocal: new Matrix3(),
445
- transformNormalLocalToWorld: new Matrix3(),
446
446
  cameraPositionUv: new Cartesian3(),
447
+ cameraDirectionUv: new Cartesian3(),
447
448
  ndcSpaceAxisAlignedBoundingBox: new Cartesian4(),
448
449
  clippingPlanesTexture: undefined,
449
450
  clippingPlanesMatrix: new Matrix4(),
@@ -1075,6 +1076,7 @@ Object.defineProperties(VoxelPrimitive.prototype, {
1075
1076
  *
1076
1077
  * @memberof VoxelPrimitive.prototype
1077
1078
  * @type {CustomShader}
1079
+ * @see {@link https://github.com/CesiumGS/cesium/tree/main/Documentation/CustomShaderGuide|Custom Shader Guide}
1078
1080
  */
1079
1081
  customShader: {
1080
1082
  get: function () {
@@ -1135,10 +1137,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
1135
1137
 
1136
1138
  const scratchIntersect = new Cartesian4();
1137
1139
  const scratchNdcAabb = new Cartesian4();
1138
- const scratchScale = new Cartesian3();
1139
- const scratchLocalScale = new Cartesian3();
1140
- const scratchRotation = new Matrix3();
1141
- const scratchRotationAndLocalScale = new Matrix3();
1142
1140
  const scratchTransformPositionWorldToLocal = new Matrix4();
1143
1141
  const scratchTransformPositionLocalToWorld = new Matrix4();
1144
1142
  const scratchTransformPositionLocalToProjection = new Matrix4();
@@ -1306,16 +1304,20 @@ VoxelPrimitive.prototype.update = function (frameState) {
1306
1304
  transformDirectionViewToWorld,
1307
1305
  uniforms.transformDirectionViewToLocal,
1308
1306
  );
1309
- uniforms.transformNormalLocalToWorld = Matrix3.clone(
1310
- this._transformNormalLocalToWorld,
1311
- uniforms.transformNormalLocalToWorld,
1312
- );
1313
- const cameraPositionWorld = frameState.camera.positionWC;
1314
1307
  uniforms.cameraPositionUv = Matrix4.multiplyByPoint(
1315
1308
  this._transformPositionWorldToUv,
1316
- cameraPositionWorld,
1309
+ frameState.camera.positionWC,
1317
1310
  uniforms.cameraPositionUv,
1318
1311
  );
1312
+ uniforms.cameraDirectionUv = Matrix3.multiplyByVector(
1313
+ this._transformDirectionWorldToUv,
1314
+ frameState.camera.directionWC,
1315
+ uniforms.cameraDirectionUv,
1316
+ );
1317
+ uniforms.cameraDirectionUv = Cartesian3.normalize(
1318
+ uniforms.cameraDirectionUv,
1319
+ uniforms.cameraDirectionUv,
1320
+ );
1319
1321
  uniforms.stepSize = this._stepSizeMultiplier;
1320
1322
 
1321
1323
  // Render the primitive
@@ -1606,23 +1608,6 @@ function updateShapeAndTransforms(primitive, shape, provider) {
1606
1608
  transformPositionLocalToWorld,
1607
1609
  scratchTransformPositionWorldToLocal,
1608
1610
  );
1609
- const rotation = Matrix4.getRotation(
1610
- transformPositionLocalToWorld,
1611
- scratchRotation,
1612
- );
1613
- // Note that inverse(rotation) is the same as transpose(rotation)
1614
- const scale = Matrix4.getScale(transformPositionLocalToWorld, scratchScale);
1615
- const maximumScaleComponent = Cartesian3.maximumComponent(scale);
1616
- const localScale = Cartesian3.divideByScalar(
1617
- scale,
1618
- maximumScaleComponent,
1619
- scratchLocalScale,
1620
- );
1621
- const rotationAndLocalScale = Matrix3.multiplyByScale(
1622
- rotation,
1623
- localScale,
1624
- scratchRotationAndLocalScale,
1625
- );
1626
1611
 
1627
1612
  // Set member variables when the shape is dirty
1628
1613
  primitive._transformPositionWorldToUv = Matrix4.multiplyTransformation(
@@ -1630,6 +1615,10 @@ function updateShapeAndTransforms(primitive, shape, provider) {
1630
1615
  transformPositionWorldToLocal,
1631
1616
  primitive._transformPositionWorldToUv,
1632
1617
  );
1618
+ primitive._transformDirectionWorldToUv = Matrix4.getMatrix3(
1619
+ primitive._transformPositionWorldToUv,
1620
+ primitive._transformDirectionWorldToUv,
1621
+ );
1633
1622
  primitive._transformPositionUvToWorld = Matrix4.multiplyTransformation(
1634
1623
  transformPositionLocalToWorld,
1635
1624
  transformPositionUvToLocal,
@@ -1639,10 +1628,6 @@ function updateShapeAndTransforms(primitive, shape, provider) {
1639
1628
  transformPositionWorldToLocal,
1640
1629
  primitive._transformDirectionWorldToLocal,
1641
1630
  );
1642
- primitive._transformNormalLocalToWorld = Matrix3.inverseTranspose(
1643
- rotationAndLocalScale,
1644
- primitive._transformNormalLocalToWorld,
1645
- );
1646
1631
 
1647
1632
  return true;
1648
1633
  }
@@ -140,13 +140,13 @@ function VoxelRenderResources(primitive) {
140
140
  }
141
141
  shaderBuilder.addFragmentLines([IntersectClippingPlanes]);
142
142
  }
143
+ shaderBuilder.addFragmentLines([IntersectDepth]);
143
144
  if (primitive._depthTest) {
144
145
  shaderBuilder.addDefine(
145
146
  "DEPTH_TEST",
146
147
  undefined,
147
148
  ShaderDestination.FRAGMENT,
148
149
  );
149
- shaderBuilder.addFragmentLines([IntersectDepth]);
150
150
  }
151
151
 
152
152
  if (shapeType === "BOX") {
@@ -38,7 +38,7 @@ function processVoxelProperties(renderResources, primitive) {
38
38
  // PropertyStatistics structs
39
39
  for (let i = 0; i < attributeLength; i++) {
40
40
  const name = names[i];
41
- const type = types[i];
41
+ const glslType = getGlslType(types[i]);
42
42
  const propertyStatisticsStructId = `PropertyStatistics_${name}`;
43
43
  const propertyStatisticsStructName = `PropertyStatistics_${name}`;
44
44
  shaderBuilder.addStruct(
@@ -46,18 +46,17 @@ function processVoxelProperties(renderResources, primitive) {
46
46
  propertyStatisticsStructName,
47
47
  ShaderDestination.FRAGMENT,
48
48
  );
49
- const glslType = getGlslType(type);
50
49
  shaderBuilder.addStructField(propertyStatisticsStructId, glslType, "min");
51
50
  shaderBuilder.addStructField(propertyStatisticsStructId, glslType, "max");
52
51
  }
53
52
 
54
- // Statistics struct
55
- const statisticsStructId = "Statistics";
56
- const statisticsStructName = "Statistics";
57
- const statisticsFieldName = "statistics";
53
+ // MetadataStatistics struct
54
+ const metadataStatisticsStructId = "MetadataStatistics";
55
+ const metadataStatisticsStructName = "MetadataStatistics";
56
+ const metadataStatisticsFieldName = "metadataStatistics";
58
57
  shaderBuilder.addStruct(
59
- statisticsStructId,
60
- statisticsStructName,
58
+ metadataStatisticsStructId,
59
+ metadataStatisticsStructName,
61
60
  ShaderDestination.FRAGMENT,
62
61
  );
63
62
  for (let i = 0; i < attributeLength; i++) {
@@ -65,7 +64,7 @@ function processVoxelProperties(renderResources, primitive) {
65
64
  const propertyStructName = `PropertyStatistics_${name}`;
66
65
  const propertyFieldName = name;
67
66
  shaderBuilder.addStructField(
68
- statisticsStructId,
67
+ metadataStatisticsStructId,
69
68
  propertyStructName,
70
69
  propertyFieldName,
71
70
  );
@@ -80,51 +79,22 @@ function processVoxelProperties(renderResources, primitive) {
80
79
  metadataStructName,
81
80
  ShaderDestination.FRAGMENT,
82
81
  );
83
- shaderBuilder.addStructField(
84
- metadataStructId,
85
- statisticsStructName,
86
- statisticsFieldName,
87
- );
88
82
  for (let i = 0; i < attributeLength; i++) {
89
- const name = names[i];
90
- const type = types[i];
91
- const glslType = getGlslType(type);
92
- shaderBuilder.addStructField(metadataStructId, glslType, name);
83
+ const glslType = getGlslType(types[i]);
84
+ shaderBuilder.addStructField(metadataStructId, glslType, names[i]);
93
85
  }
94
86
 
95
- // VoxelProperty structs
96
- for (let i = 0; i < attributeLength; i++) {
97
- const name = names[i];
98
- const type = types[i];
99
- const glslType = getGlslPartialDerivativeType(type);
100
- const voxelPropertyStructId = `VoxelProperty_${name}`;
101
- const voxelPropertyStructName = `VoxelProperty_${name}`;
102
- shaderBuilder.addStruct(
103
- voxelPropertyStructId,
104
- voxelPropertyStructName,
105
- ShaderDestination.FRAGMENT,
106
- );
107
- shaderBuilder.addStructField(
108
- voxelPropertyStructId,
109
- glslType,
110
- "partialDerivativeLocal",
111
- );
112
- shaderBuilder.addStructField(
113
- voxelPropertyStructId,
114
- glslType,
115
- "partialDerivativeWorld",
116
- );
117
- shaderBuilder.addStructField(
118
- voxelPropertyStructId,
119
- glslType,
120
- "partialDerivativeView",
121
- );
122
- shaderBuilder.addStructField(
123
- voxelPropertyStructId,
124
- glslType,
125
- "partialDerivativeValid",
126
- );
127
- }
87
+ // Attributes struct
88
+ const attributesStructId = "Attributes";
89
+ const attributesStructName = "Attributes";
90
+ const attributesFieldName = "attributes";
91
+ shaderBuilder.addStruct(
92
+ attributesStructId,
93
+ attributesStructName,
94
+ ShaderDestination.FRAGMENT,
95
+ );
96
+ shaderBuilder.addStructField(attributesStructId, "vec3", "positionEC");
97
+ shaderBuilder.addStructField(attributesStructId, "vec3", "normalEC");
128
98
 
129
99
  // Voxel struct
130
100
  const voxelStructId = "Voxel";
@@ -135,22 +105,12 @@ function processVoxelProperties(renderResources, primitive) {
135
105
  voxelStructName,
136
106
  ShaderDestination.FRAGMENT,
137
107
  );
138
- for (let i = 0; i < attributeLength; i++) {
139
- const name = names[i];
140
- const voxelPropertyStructName = `VoxelProperty_${name}`;
141
- shaderBuilder.addStructField(voxelStructId, voxelPropertyStructName, name);
142
- }
143
- shaderBuilder.addStructField(voxelStructId, "vec3", "positionEC");
144
- shaderBuilder.addStructField(voxelStructId, "vec3", "positionUv");
145
- shaderBuilder.addStructField(voxelStructId, "vec3", "positionShapeUv");
146
- shaderBuilder.addStructField(voxelStructId, "vec3", "positionUvLocal");
147
108
  shaderBuilder.addStructField(voxelStructId, "vec3", "viewDirUv");
148
- shaderBuilder.addStructField(voxelStructId, "vec3", "viewDirWorld");
149
- shaderBuilder.addStructField(voxelStructId, "vec3", "surfaceNormal");
150
109
  shaderBuilder.addStructField(voxelStructId, "float", "travelDistance");
151
110
  shaderBuilder.addStructField(voxelStructId, "int", "stepCount");
152
111
  shaderBuilder.addStructField(voxelStructId, "int", "tileIndex");
153
112
  shaderBuilder.addStructField(voxelStructId, "int", "sampleIndex");
113
+ shaderBuilder.addStructField(voxelStructId, "float", "distanceToDepthBuffer");
154
114
 
155
115
  // FragmentInput struct
156
116
  const fragmentInputStructId = "FragmentInput";
@@ -160,11 +120,21 @@ function processVoxelProperties(renderResources, primitive) {
160
120
  fragmentInputStructName,
161
121
  ShaderDestination.FRAGMENT,
162
122
  );
123
+ shaderBuilder.addStructField(
124
+ fragmentInputStructId,
125
+ metadataStatisticsStructName,
126
+ metadataStatisticsFieldName,
127
+ );
163
128
  shaderBuilder.addStructField(
164
129
  fragmentInputStructId,
165
130
  metadataStructName,
166
131
  metadataFieldName,
167
132
  );
133
+ shaderBuilder.addStructField(
134
+ fragmentInputStructId,
135
+ attributesStructName,
136
+ attributesFieldName,
137
+ );
168
138
  shaderBuilder.addStructField(
169
139
  fragmentInputStructId,
170
140
  voxelStructName,
@@ -181,10 +151,8 @@ function processVoxelProperties(renderResources, primitive) {
181
151
  ShaderDestination.FRAGMENT,
182
152
  );
183
153
  for (let i = 0; i < attributeLength; i++) {
184
- const name = names[i];
185
- const type = types[i];
186
- const glslType = getGlslType(type);
187
- shaderBuilder.addStructField(propertiesStructId, glslType, name);
154
+ const glslType = getGlslType(types[i]);
155
+ shaderBuilder.addStructField(propertiesStructId, glslType, names[i]);
188
156
  }
189
157
 
190
158
  // Fragment shader functions
@@ -201,12 +169,9 @@ function processVoxelProperties(renderResources, primitive) {
201
169
  `${propertiesStructName} ${propertiesFieldName};`,
202
170
  ]);
203
171
  for (let i = 0; i < attributeLength; i++) {
204
- const name = names[i];
205
- const type = types[i];
206
- const componentType = componentTypes[i];
207
- const glslType = getGlslType(type, componentType);
172
+ const glslType = getGlslType(types[i], componentTypes[i]);
208
173
  shaderBuilder.addFunctionLines(functionId, [
209
- `${propertiesFieldName}.${name} = ${glslType}(0.0);`,
174
+ `${propertiesFieldName}.${names[i]} = ${glslType}(0.0);`,
210
175
  ]);
211
176
  }
212
177
  shaderBuilder.addFunctionLines(functionId, [
@@ -248,9 +213,8 @@ function processVoxelProperties(renderResources, primitive) {
248
213
  `${propertiesStructName} scaledProperties = ${propertiesFieldName};`,
249
214
  ]);
250
215
  for (let i = 0; i < attributeLength; i++) {
251
- const name = names[i];
252
216
  shaderBuilder.addFunctionLines(functionId, [
253
- `scaledProperties.${name} *= scale;`,
217
+ `scaledProperties.${names[i]} *= scale;`,
254
218
  ]);
255
219
  }
256
220
  shaderBuilder.addFunctionLines(functionId, [`return scaledProperties;`]);
@@ -299,7 +263,7 @@ function processVoxelProperties(renderResources, primitive) {
299
263
  const functionId = "setStatistics";
300
264
  shaderBuilder.addFunction(
301
265
  functionId,
302
- `void setStatistics(inout ${statisticsStructName} ${statisticsFieldName})`,
266
+ `void setStatistics(inout ${metadataStatisticsStructName} ${metadataStatisticsFieldName})`,
303
267
  ShaderDestination.FRAGMENT,
304
268
  );
305
269
  for (let i = 0; i < attributeLength; i++) {
@@ -314,10 +278,10 @@ function processVoxelProperties(renderResources, primitive) {
314
278
  continue;
315
279
  }
316
280
  shaderBuilder.addFunctionLines(functionId, [
317
- `${statisticsFieldName}.${name}.min${glslField} = ${getGlslNumberAsFloat(
281
+ `${metadataStatisticsFieldName}.${name}.min${glslField} = ${getGlslNumberAsFloat(
318
282
  minimumValue,
319
283
  )};`,
320
- `${statisticsFieldName}.${name}.max${glslField} = ${getGlslNumberAsFloat(
284
+ `${metadataStatisticsFieldName}.${name}.max${glslField} = ${getGlslNumberAsFloat(
321
285
  maximumValue,
322
286
  )};`,
323
287
  ]);
@@ -337,12 +301,11 @@ function processVoxelProperties(renderResources, primitive) {
337
301
  `${propertiesStructName} ${propertiesFieldName};`,
338
302
  ]);
339
303
  for (let i = 0; i < attributeLength; i++) {
340
- const name = names[i];
341
304
  const type = types[i];
342
305
  const componentType = componentTypes[i];
343
306
  const glslTextureSwizzle = getGlslTextureSwizzle(type, componentType);
344
307
  shaderBuilder.addFunctionLines(functionId, [
345
- `properties.${name} = texture(u_megatextureTextures[${i}], texcoord)${glslTextureSwizzle};`,
308
+ `properties.${names[i]} = texture(u_megatextureTextures[${i}], texcoord)${glslTextureSwizzle};`,
346
309
  ]);
347
310
  }
348
311
  shaderBuilder.addFunctionLines(functionId, [
@@ -395,28 +358,6 @@ function getGlslTextureSwizzle(type) {
395
358
  }
396
359
  }
397
360
 
398
- /**
399
- * Gets the GLSL type of the partial derivative of {@link MetadataType}.
400
- *
401
- * @function
402
- *
403
- * @param {MetadataType} type The {@link MetadataType}.
404
- * @returns {string} The GLSL type.
405
- *
406
- * @private
407
- */
408
- function getGlslPartialDerivativeType(type) {
409
- if (type === MetadataType.SCALAR) {
410
- return "vec3";
411
- } else if (type === MetadataType.VEC2) {
412
- return "mat2";
413
- } else if (type === MetadataType.VEC3) {
414
- return "mat3";
415
- } else if (type === MetadataType.VEC4) {
416
- return "mat4";
417
- }
418
- }
419
-
420
361
  /**
421
362
  * GLSL needs to have `.0` at the end of whole number floats or else it's
422
363
  * treated like an integer.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
3
+ *
4
+ * @name czm_passGaussianSplats
5
+ * @glslConstant
6
+ *
7
+ * @see czm_pass
8
+ */
9
+ const float czm_passGaussianSplats = 10.0;
@@ -0,0 +1,11 @@
1
+ //This file is automatically rebuilt by the Cesium build process.
2
+ export default "/**\n\
3
+ * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}\n\
4
+ *\n\
5
+ * @name czm_passGaussianSplats\n\
6
+ * @glslConstant\n\
7
+ *\n\
8
+ * @see czm_pass\n\
9
+ */\n\
10
+ const float czm_passGaussianSplats = 10.0;\n\
11
+ ";
@@ -6,4 +6,4 @@
6
6
  *
7
7
  * @see czm_pass
8
8
  */
9
- const float czm_passOverlay = 10.0;
9
+ const float czm_passOverlay = 11.0;
@@ -7,5 +7,5 @@ export default "/**\n\
7
7
  *\n\
8
8
  * @see czm_pass\n\
9
9
  */\n\
10
- const float czm_passOverlay = 10.0;\n\
10
+ const float czm_passOverlay = 11.0;\n\
11
11
  ";
@@ -17,6 +17,7 @@ import czm_passCesium3DTileClassificationIgnoreShow from './Constants/passCesium
17
17
  import czm_passClassification from './Constants/passClassification.js'
18
18
  import czm_passCompute from './Constants/passCompute.js'
19
19
  import czm_passEnvironment from './Constants/passEnvironment.js'
20
+ import czm_passGaussianSplats from './Constants/passGaussianSplats.js'
20
21
  import czm_passGlobe from './Constants/passGlobe.js'
21
22
  import czm_passOpaque from './Constants/passOpaque.js'
22
23
  import czm_passOverlay from './Constants/passOverlay.js'
@@ -155,6 +156,7 @@ export default {
155
156
  czm_passClassification : czm_passClassification,
156
157
  czm_passCompute : czm_passCompute,
157
158
  czm_passEnvironment : czm_passEnvironment,
159
+ czm_passGaussianSplats : czm_passGaussianSplats,
158
160
  czm_passGlobe : czm_passGlobe,
159
161
  czm_passOpaque : czm_passOpaque,
160
162
  czm_passOverlay : czm_passOverlay,
@@ -76,7 +76,6 @@ vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
76
76
  vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
77
77
  vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
78
78
  eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
79
- return eyeCoordinate;
80
79
  #else
81
80
  vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
82
81
  vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
@@ -77,7 +77,6 @@ vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)\
77
77
  vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n\
78
78
  vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);\n\
79
79
  eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n\
80
- return eyeCoordinate;\n\
81
80
  #else\n\
82
81
  vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);\n\
83
82
  vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);\n\
@@ -87,25 +87,47 @@ flat in int v_regionIndex;
87
87
  uniform float u_minimumBrightness;
88
88
  #endif
89
89
 
90
+ // Based on colorCorrect
91
+ // The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift
92
+ // are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider
93
+ // - The tileProvider.hue/saturation/brightnessShift are just passed through
94
+ // from the Globe hue/saturation/brightness, like atmosphereBrightnessShift
95
+ // - The applyFog depends on enableFog, and some tile distance from the viewer
96
+ // - The showGroundAtmosphere is a flag that is passed through from the Globe,
97
+ // and is true by default when the ellipsoid is WGS84
90
98
  #ifdef COLOR_CORRECT
91
99
  uniform vec3 u_hsbShift; // Hue, saturation, brightness
92
100
  #endif
93
101
 
102
+ // Based on highlightFillTile
103
+ // This is set for terrain tiles when they are "fill" tiles, and
104
+ // the terrainProvider.fillHighlightColor was set to a value with
105
+ // nonzero alpha
94
106
  #ifdef HIGHLIGHT_FILL_TILE
95
107
  uniform vec4 u_fillHighlightColor;
96
108
  #endif
97
109
 
110
+ // Based on translucent
111
+ // This is set depending on the GlobeTranslucencyState
98
112
  #ifdef TRANSLUCENT
99
113
  uniform vec4 u_frontFaceAlphaByDistance;
100
114
  uniform vec4 u_backFaceAlphaByDistance;
101
115
  uniform vec4 u_translucencyRectangle;
102
116
  #endif
103
117
 
118
+ // Based on showUndergroundColor
119
+ // This is set when GlobeSurfaceTileProvider.isUndergroundVisible
120
+ // returns true, AND the tileProvider.undergroundColor had a value with
121
+ // nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance
122
+ // was in the right range
104
123
  #ifdef UNDERGROUND_COLOR
105
124
  uniform vec4 u_undergroundColor;
106
125
  uniform vec4 u_undergroundColorAlphaByDistance;
107
126
  #endif
108
127
 
128
+ // Based on enableLighting && hasVertexNormals
129
+ // The enableLighting flag is passed in directly from the Globe.
130
+ // The hasVertexNormals flag is from the tileProvider
109
131
  #ifdef ENABLE_VERTEX_LIGHTING
110
132
  uniform float u_lambertDiffuseMultiplier;
111
133
  uniform float u_vertexShadowDarkness;
@@ -88,25 +88,47 @@ flat in int v_regionIndex;\n\
88
88
  uniform float u_minimumBrightness;\n\
89
89
  #endif\n\
90
90
  \n\
91
+ // Based on colorCorrect\n\
92
+ // The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift \n\
93
+ // are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider\n\
94
+ // - The tileProvider.hue/saturation/brightnessShift are just passed through\n\
95
+ // from the Globe hue/saturation/brightness, like atmosphereBrightnessShift\n\
96
+ // - The applyFog depends on enableFog, and some tile distance from the viewer\n\
97
+ // - The showGroundAtmosphere is a flag that is passed through from the Globe,\n\
98
+ // and is true by default when the ellipsoid is WGS84\n\
91
99
  #ifdef COLOR_CORRECT\n\
92
100
  uniform vec3 u_hsbShift; // Hue, saturation, brightness\n\
93
101
  #endif\n\
94
102
  \n\
103
+ // Based on highlightFillTile\n\
104
+ // This is set for terrain tiles when they are \"fill\" tiles, and\n\
105
+ // the terrainProvider.fillHighlightColor was set to a value with\n\
106
+ // nonzero alpha\n\
95
107
  #ifdef HIGHLIGHT_FILL_TILE\n\
96
108
  uniform vec4 u_fillHighlightColor;\n\
97
109
  #endif\n\
98
110
  \n\
111
+ // Based on translucent\n\
112
+ // This is set depending on the GlobeTranslucencyState\n\
99
113
  #ifdef TRANSLUCENT\n\
100
114
  uniform vec4 u_frontFaceAlphaByDistance;\n\
101
115
  uniform vec4 u_backFaceAlphaByDistance;\n\
102
116
  uniform vec4 u_translucencyRectangle;\n\
103
117
  #endif\n\
104
118
  \n\
119
+ // Based on showUndergroundColor\n\
120
+ // This is set when GlobeSurfaceTileProvider.isUndergroundVisible \n\
121
+ // returns true, AND the tileProvider.undergroundColor had a value with \n\
122
+ // nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance\n\
123
+ // was in the right range\n\
105
124
  #ifdef UNDERGROUND_COLOR\n\
106
125
  uniform vec4 u_undergroundColor;\n\
107
126
  uniform vec4 u_undergroundColorAlphaByDistance;\n\
108
127
  #endif\n\
109
128
  \n\
129
+ // Based on enableLighting && hasVertexNormals\n\
130
+ // The enableLighting flag is passed in directly from the Globe.\n\
131
+ // The hasVertexNormals flag is from the tileProvider\n\
110
132
  #ifdef ENABLE_VERTEX_LIGHTING\n\
111
133
  uniform float u_lambertDiffuseMultiplier;\n\
112
134
  uniform float u_vertexShadowDarkness;\n\
@@ -444,6 +444,10 @@ void materialStage(inout czm_modelMaterial material, ProcessedAttributes attribu
444
444
  baseColorWithAlpha = u_baseColorFactor;
445
445
  #endif
446
446
 
447
+ #ifdef HAS_IMAGERY
448
+ baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);
449
+ #endif // HAS_IMAGERY
450
+
447
451
  #ifdef HAS_POINT_CLOUD_COLOR_STYLE
448
452
  baseColorWithAlpha = v_pointCloudColor;
449
453
  #elif defined(HAS_COLOR_0)
@@ -444,6 +444,10 @@ void materialStage(inout czm_modelMaterial material, ProcessedAttributes attribu
444
444
  #elif defined(HAS_BASE_COLOR_FACTOR)\n\
445
445
  baseColorWithAlpha = u_baseColorFactor;\n\
446
446
  #endif\n\
447
+ \n\
448
+ #ifdef HAS_IMAGERY\n\
449
+ baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);\n\
450
+ #endif // HAS_IMAGERY\n\
447
451
  \n\
448
452
  #ifdef HAS_POINT_CLOUD_COLOR_STYLE\n\
449
453
  baseColorWithAlpha = v_pointCloudColor;\n\