@cesium/engine 1.0.0 → 2.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.
- package/Build/Workers/{AttributeCompression-4589338a.js → AttributeCompression-b646d393.js} +1 -1
- package/Build/Workers/{AxisAlignedBoundingBox-bfb1234f.js → AxisAlignedBoundingBox-47525601.js} +1 -1
- package/Build/Workers/{BoundingRectangle-7ffc2153.js → BoundingRectangle-93b263ac.js} +1 -1
- package/Build/Workers/{BoxGeometry-93f344a3.js → BoxGeometry-8c4b4125.js} +1 -1
- package/Build/Workers/{Color-0c5aaf47.js → Color-52c60ed7.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-6597982a.js → CoplanarPolygonGeometryLibrary-33c4c1f8.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-2119580e.js → CorridorGeometryLibrary-5039cd8e.js} +1 -1
- package/Build/Workers/{CylinderGeometry-f9503c6d.js → CylinderGeometry-3ac44974.js} +1 -1
- package/Build/Workers/{EllipseGeometry-fedf72d5.js → EllipseGeometry-a9c9b3be.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-4ea68687.js → EllipseGeometryLibrary-855d4681.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-e2ae6a35.js → EllipseOutlineGeometry-017a5929.js} +1 -1
- package/Build/Workers/{EllipsoidGeodesic-16de63ea.js → EllipsoidGeodesic-98c62a56.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-95c0330e.js → EllipsoidGeometry-826e7bce.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-d6d2ceec.js → EllipsoidOutlineGeometry-784dcdb5.js} +1 -1
- package/Build/Workers/{EllipsoidRhumbLine-ae5e65e0.js → EllipsoidRhumbLine-19756602.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-bfc674bf.js → EllipsoidTangentPlane-ed9443a1.js} +1 -1
- package/Build/Workers/{EncodedCartesian3-f473ea18.js → EncodedCartesian3-81f70735.js} +1 -1
- package/Build/Workers/{FrustumGeometry-3bf2e4eb.js → FrustumGeometry-9f1ee4d8.js} +1 -1
- package/Build/Workers/{GeometryAttribute-df5f473e.js → GeometryAttribute-334718f8.js} +1 -1
- package/Build/Workers/{GeometryInstance-aa75b4cf.js → GeometryInstance-451dc1cd.js} +1 -1
- package/Build/Workers/{GeometryPipeline-f0e46c42.js → GeometryPipeline-8fb0db69.js} +1 -1
- package/Build/Workers/{IntersectionTests-9de29d51.js → IntersectionTests-27d49265.js} +1 -1
- package/Build/Workers/{Matrix2-ce637455.js → Matrix2-13178034.js} +4 -2
- package/Build/Workers/{Matrix3-4f4df527.js → Matrix3-315394f6.js} +2 -1
- package/Build/Workers/{OrientedBoundingBox-d3ff3d4d.js → OrientedBoundingBox-79ee7cbb.js} +5 -5
- package/Build/Workers/{Plane-b81241c2.js → Plane-900aa728.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-6f4937bb.js → PolygonGeometryLibrary-6b5a29e9.js} +1 -1
- package/Build/Workers/PolygonPipeline-21668b3f.js +1345 -0
- package/Build/Workers/{PolylinePipeline-2e2b015c.js → PolylinePipeline-5e2e1b21.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-7ee1d449.js → PolylineVolumeGeometryLibrary-97f0b94e.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-a9b7aae0.js → PrimitivePipeline-5640850a.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-9aa6c8f6.js → RectangleGeometryLibrary-d5457f7b.js} +1 -1
- package/Build/Workers/{TerrainEncoding-b52dcfc5.js → TerrainEncoding-bfdf2021.js} +1 -1
- package/Build/Workers/{Transforms-2f755df8.js → Transforms-a05e5e6e.js} +114 -83
- package/Build/Workers/{WallGeometryLibrary-ab19a93d.js → WallGeometryLibrary-6db0ebb6.js} +1 -1
- package/Build/Workers/{WebMercatorProjection-9f25de49.js → WebMercatorProjection-13a90d41.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +92 -2
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePoints.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVectorTilePolylines.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +7 -3
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/decodeDraco.js +9 -1
- package/Build/Workers/decodeI3S.js +1 -1
- package/Build/Workers/package.js +25 -1
- package/Build/Workers/transcodeKTX2.js +22 -2
- package/Build/Workers/transferTypedArrayTest.js +25 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/README.md +14 -16
- package/Source/Core/EarthOrientationParameters.js +67 -63
- package/Source/Core/FeatureDetection.js +18 -0
- package/Source/Core/Ion.js +1 -2
- package/Source/Core/Matrix2.js +2 -1
- package/Source/Core/Matrix3.js +2 -1
- package/Source/Core/Matrix4.js +1 -0
- package/Source/Core/OrientedBoundingBox.js +4 -4
- package/Source/Core/PixelFormat.js +22 -2
- package/Source/Core/S2Cell.js +3 -3
- package/Source/Core/Transforms.js +3 -7
- package/Source/Core/sampleTerrain.js +5 -0
- package/Source/DataSources/GpxDataSource.js +4 -6
- package/Source/DataSources/KmlDataSource.js +3 -5
- package/Source/Renderer/AutomaticUniforms.js +3 -3
- package/Source/Renderer/Context.js +20 -12
- package/Source/Renderer/Pass.js +3 -2
- package/Source/Renderer/ShaderBuilder.js +13 -12
- package/Source/Renderer/ShaderSource.js +31 -26
- package/Source/Renderer/demodernizeShader.js +76 -0
- package/Source/Scene/AutoExposure.js +5 -5
- package/Source/Scene/BatchTable.js +5 -5
- package/Source/Scene/BillboardCollection.js +2 -2
- package/Source/Scene/BingMapsImageryProvider.js +1 -1
- package/Source/Scene/Cesium3DTile.js +8 -2
- package/Source/Scene/Cesium3DTileBatchTable.js +28 -28
- package/Source/Scene/Cesium3DTileContentType.js +19 -0
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +494 -0
- package/Source/Scene/Cesium3DTileset.js +6 -1
- package/Source/Scene/Cesium3DTilesetMetadata.js +2 -2
- package/Source/Scene/ClassificationPrimitive.js +3 -8
- package/Source/Scene/ContentMetadata.js +2 -2
- package/Source/Scene/DebugAppearance.js +7 -9
- package/Source/Scene/DebugInspector.js +5 -5
- package/Source/Scene/DepthPlane.js +0 -6
- package/Source/Scene/DerivedCommand.js +15 -22
- package/Source/Scene/EllipsoidPrimitive.js +0 -7
- package/Source/Scene/Expression.js +1 -1
- package/Source/Scene/Globe.js +10 -0
- package/Source/Scene/GlobeSurfaceTileProvider.js +7 -0
- package/Source/Scene/GlobeTranslucencyState.js +6 -6
- package/Source/Scene/GltfImageLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +10 -2
- package/Source/Scene/GroundPolylinePrimitive.js +2 -4
- package/Source/Scene/GroupMetadata.js +2 -2
- package/Source/Scene/ImplicitMetadataView.js +2 -2
- package/Source/Scene/ImplicitSubtreeCache.js +127 -0
- package/Source/Scene/ImplicitSubtreeMetadata.js +2 -2
- package/Source/Scene/ImplicitTileset.js +3 -2
- package/Source/Scene/InvertClassification.js +9 -10
- package/Source/Scene/KeyframeNode.js +47 -0
- package/Source/Scene/Material.js +6 -6
- package/Source/Scene/Megatexture.js +490 -0
- package/Source/Scene/MetadataClass.js +60 -25
- package/Source/Scene/MetadataClassProperty.js +132 -68
- package/Source/Scene/MetadataComponentType.js +78 -57
- package/Source/Scene/MetadataEnum.js +59 -23
- package/Source/Scene/MetadataEnumValue.js +49 -15
- package/Source/Scene/MetadataSchema.js +53 -24
- package/Source/Scene/MetadataSchemaLoader.js +2 -2
- package/Source/Scene/MetadataSemantic.js +8 -0
- package/Source/Scene/MetadataTableProperty.js +2 -2
- package/Source/Scene/MetadataType.js +6 -14
- package/Source/Scene/Model/CustomShader.js +1 -1
- package/Source/Scene/Model/FeatureIdPipelineStage.js +4 -4
- package/Source/Scene/Model/GeoJsonLoader.js +1 -1
- package/Source/Scene/Model/LightingModel.js +1 -1
- package/Source/Scene/Model/MetadataPipelineStage.js +1 -1
- package/Source/Scene/Model/Model.js +2 -3
- package/Source/Scene/Model/PickingPipelineStage.js +1 -1
- package/Source/Scene/Model/buildDrawCommand.js +19 -11
- package/Source/Scene/OIT.js +211 -119
- package/Source/Scene/PickDepth.js +2 -2
- package/Source/Scene/PointCloud.js +12 -12
- package/Source/Scene/PointCloudEyeDomeLighting.js +9 -4
- package/Source/Scene/PolylineCollection.js +2 -7
- package/Source/Scene/PolylineMaterialAppearance.js +2 -3
- package/Source/Scene/PostProcessStage.js +13 -13
- package/Source/Scene/PostProcessStageLibrary.js +3 -3
- package/Source/Scene/Primitive.js +22 -31
- package/Source/Scene/PropertyAttribute.js +2 -2
- package/Source/Scene/PropertyAttributeProperty.js +2 -2
- package/Source/Scene/PropertyTable.js +2 -2
- package/Source/Scene/PropertyTexture.js +2 -2
- package/Source/Scene/PropertyTextureProperty.js +2 -2
- package/Source/Scene/ResourceCache.js +9 -1
- package/Source/Scene/ResourceCacheKey.js +9 -1
- package/Source/Scene/Scene.js +17 -0
- package/Source/Scene/ShadowMap.js +7 -7
- package/Source/Scene/ShadowMapShader.js +9 -9
- package/Source/Scene/ShadowVolumeAppearance.js +1 -1
- package/Source/Scene/SpatialNode.js +375 -0
- package/Source/Scene/StructuralMetadata.js +2 -2
- package/Source/Scene/TextureAtlas.js +5 -3
- package/Source/Scene/TileMetadata.js +2 -2
- package/Source/Scene/TilesetMetadata.js +2 -2
- package/Source/Scene/Vector3DTilePolylines.js +1 -1
- package/Source/Scene/Vector3DTilePrimitive.js +2 -2
- package/Source/Scene/VoxelBoxShape.js +527 -0
- package/Source/Scene/VoxelContent.js +169 -0
- package/Source/Scene/VoxelCylinderShape.js +937 -0
- package/Source/Scene/VoxelEllipsoidShape.js +945 -0
- package/Source/Scene/VoxelPrimitive.js +1919 -0
- package/Source/Scene/VoxelProvider.js +255 -0
- package/Source/Scene/VoxelRenderResources.js +224 -0
- package/Source/Scene/VoxelShape.js +152 -0
- package/Source/Scene/VoxelShapeType.js +105 -0
- package/Source/Scene/VoxelTraversal.js +1144 -0
- package/Source/Scene/buildVoxelDrawCommands.js +116 -0
- package/Source/Scene/computeFlyToLocationForRectangle.js +10 -1
- package/Source/Scene/createElevationBandMaterial.js +10 -15
- package/Source/Scene/getClipAndStyleCode.js +1 -1
- package/Source/Scene/getClippingFunction.js +3 -3
- package/Source/Scene/parseBatchTable.js +18 -2
- package/Source/Scene/preprocess3DTileContent.js +8 -0
- package/Source/Scene/processVoxelProperties.js +455 -0
- package/Source/Shaders/AdjustTranslucentFS.glsl +9 -6
- package/Source/Shaders/AdjustTranslucentFS.js +9 -6
- package/Source/Shaders/Appearances/AllMaterialAppearanceFS.glsl +7 -7
- package/Source/Shaders/Appearances/AllMaterialAppearanceFS.js +7 -7
- package/Source/Shaders/Appearances/AllMaterialAppearanceVS.glsl +12 -12
- package/Source/Shaders/Appearances/AllMaterialAppearanceVS.js +12 -12
- package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.glsl +4 -4
- package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.js +4 -4
- package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.glsl +6 -6
- package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.js +6 -6
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.glsl +5 -5
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.js +5 -5
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.glsl +7 -7
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.js +7 -7
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.glsl +4 -4
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.js +4 -4
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.glsl +8 -8
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.js +8 -8
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.glsl +2 -2
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.js +2 -2
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.glsl +5 -5
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.js +5 -5
- package/Source/Shaders/Appearances/PolylineColorAppearanceVS.glsl +10 -10
- package/Source/Shaders/Appearances/PolylineColorAppearanceVS.js +10 -10
- package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.glsl +12 -12
- package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.js +12 -12
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.glsl +5 -5
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.js +5 -5
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.glsl +8 -8
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.js +8 -8
- package/Source/Shaders/BillboardCollectionFS.glsl +15 -15
- package/Source/Shaders/BillboardCollectionFS.js +15 -15
- package/Source/Shaders/BillboardCollectionVS.glsl +24 -24
- package/Source/Shaders/BillboardCollectionVS.js +24 -24
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +2 -2
- package/Source/Shaders/BrdfLutGeneratorFS.js +2 -2
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passVoxels.js +11 -0
- package/Source/Shaders/Builtin/CzmBuiltins.js +19 -15
- package/Source/Shaders/Builtin/Functions/depthClamp.glsl +3 -3
- package/Source/Shaders/Builtin/Functions/depthClamp.js +3 -3
- package/Source/Shaders/Builtin/Functions/getWaterNoise.glsl +4 -4
- package/Source/Shaders/Builtin/Functions/getWaterNoise.js +4 -4
- package/Source/Shaders/Builtin/Functions/phong.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/phong.js +1 -1
- package/Source/Shaders/Builtin/Functions/readDepth.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/readDepth.js +1 -1
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +5 -5
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +5 -5
- package/Source/Shaders/Builtin/Functions/shadowDepthCompare.glsl +3 -3
- package/Source/Shaders/Builtin/Functions/shadowDepthCompare.js +3 -3
- package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.js +1 -1
- package/Source/Shaders/Builtin/Functions/textureCube.glsl +17 -0
- package/Source/Shaders/Builtin/Functions/textureCube.js +18 -0
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl +2 -2
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.js +2 -2
- package/Source/Shaders/Builtin/Functions/vertexLogDepth.glsl +2 -2
- package/Source/Shaders/Builtin/Functions/vertexLogDepth.js +2 -2
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +55 -43
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +55 -43
- package/Source/Shaders/Builtin/Functions/writeDepthClamp.glsl +5 -8
- package/Source/Shaders/Builtin/Functions/writeDepthClamp.js +5 -8
- package/Source/Shaders/Builtin/Functions/writeLogDepth.glsl +6 -6
- package/Source/Shaders/Builtin/Functions/writeLogDepth.js +6 -6
- package/Source/Shaders/CloudCollectionFS.glsl +18 -18
- package/Source/Shaders/CloudCollectionFS.js +18 -18
- package/Source/Shaders/CloudCollectionVS.glsl +11 -11
- package/Source/Shaders/CloudCollectionVS.js +11 -11
- package/Source/Shaders/CloudNoiseFS.glsl +5 -5
- package/Source/Shaders/CloudNoiseFS.js +5 -5
- package/Source/Shaders/CloudNoiseVS.glsl +2 -2
- package/Source/Shaders/CloudNoiseVS.js +2 -2
- package/Source/Shaders/CompareAndPackTranslucentDepth.glsl +4 -4
- package/Source/Shaders/CompareAndPackTranslucentDepth.js +4 -4
- package/Source/Shaders/CompositeOITFS.glsl +6 -6
- package/Source/Shaders/CompositeOITFS.js +6 -6
- package/Source/Shaders/DepthPlaneFS.glsl +2 -2
- package/Source/Shaders/DepthPlaneFS.js +2 -2
- package/Source/Shaders/DepthPlaneVS.glsl +2 -2
- package/Source/Shaders/DepthPlaneVS.js +2 -2
- package/Source/Shaders/EllipsoidFS.glsl +5 -13
- package/Source/Shaders/EllipsoidFS.js +6 -14
- package/Source/Shaders/EllipsoidVS.glsl +2 -2
- package/Source/Shaders/EllipsoidVS.js +2 -2
- package/Source/Shaders/FXAA3_11.glsl +4 -4
- package/Source/Shaders/FXAA3_11.js +4 -4
- package/Source/Shaders/GlobeFS.glsl +17 -16
- package/Source/Shaders/GlobeFS.js +17 -16
- package/Source/Shaders/GlobeVS.glsl +17 -17
- package/Source/Shaders/GlobeVS.js +17 -17
- package/Source/Shaders/Materials/AspectRampMaterial.glsl +1 -1
- package/Source/Shaders/Materials/AspectRampMaterial.js +1 -1
- package/Source/Shaders/Materials/BumpMapMaterial.glsl +3 -3
- package/Source/Shaders/Materials/BumpMapMaterial.js +3 -3
- package/Source/Shaders/Materials/ElevationBandMaterial.glsl +3 -3
- package/Source/Shaders/Materials/ElevationBandMaterial.js +3 -3
- package/Source/Shaders/Materials/ElevationContourMaterial.glsl +2 -1
- package/Source/Shaders/Materials/ElevationContourMaterial.js +2 -1
- package/Source/Shaders/Materials/ElevationRampMaterial.glsl +1 -1
- package/Source/Shaders/Materials/ElevationRampMaterial.js +1 -1
- package/Source/Shaders/Materials/GridMaterial.glsl +3 -2
- package/Source/Shaders/Materials/GridMaterial.js +3 -2
- package/Source/Shaders/Materials/NormalMapMaterial.glsl +1 -1
- package/Source/Shaders/Materials/NormalMapMaterial.js +1 -1
- package/Source/Shaders/Materials/PolylineArrowMaterial.glsl +3 -2
- package/Source/Shaders/Materials/PolylineArrowMaterial.js +3 -2
- package/Source/Shaders/Materials/PolylineDashMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineDashMaterial.js +1 -1
- package/Source/Shaders/Materials/PolylineOutlineMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineOutlineMaterial.js +1 -1
- package/Source/Shaders/Materials/SlopeRampMaterial.glsl +1 -1
- package/Source/Shaders/Materials/SlopeRampMaterial.js +1 -1
- package/Source/Shaders/Materials/Water.glsl +1 -1
- package/Source/Shaders/Materials/Water.js +1 -1
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +3 -3
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +3 -3
- package/Source/Shaders/Model/MaterialStageFS.glsl +10 -10
- package/Source/Shaders/Model/MaterialStageFS.js +10 -10
- package/Source/Shaders/Model/ModelClippingPlanesStageFS.glsl +3 -3
- package/Source/Shaders/Model/ModelClippingPlanesStageFS.js +3 -3
- package/Source/Shaders/Model/ModelFS.glsl +1 -1
- package/Source/Shaders/Model/ModelFS.js +1 -1
- package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +3 -3
- package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +3 -3
- package/Source/Shaders/Model/SelectedFeatureIdStageCommon.glsl +1 -1
- package/Source/Shaders/Model/SelectedFeatureIdStageCommon.js +1 -1
- package/Source/Shaders/OctahedralProjectionAtlasFS.glsl +8 -8
- package/Source/Shaders/OctahedralProjectionAtlasFS.js +8 -8
- package/Source/Shaders/OctahedralProjectionFS.glsl +4 -4
- package/Source/Shaders/OctahedralProjectionFS.js +4 -4
- package/Source/Shaders/OctahedralProjectionVS.glsl +3 -3
- package/Source/Shaders/OctahedralProjectionVS.js +3 -3
- package/Source/Shaders/PointPrimitiveCollectionFS.glsl +6 -6
- package/Source/Shaders/PointPrimitiveCollectionFS.js +6 -6
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +17 -14
- package/Source/Shaders/PointPrimitiveCollectionVS.js +17 -14
- package/Source/Shaders/PolylineFS.glsl +3 -3
- package/Source/Shaders/PolylineFS.js +3 -3
- package/Source/Shaders/PolylineShadowVolumeFS.glsl +12 -16
- package/Source/Shaders/PolylineShadowVolumeFS.js +12 -16
- package/Source/Shaders/PolylineShadowVolumeMorphFS.glsl +8 -8
- package/Source/Shaders/PolylineShadowVolumeMorphFS.js +8 -8
- package/Source/Shaders/PolylineShadowVolumeMorphVS.glsl +20 -20
- package/Source/Shaders/PolylineShadowVolumeMorphVS.js +20 -20
- package/Source/Shaders/PolylineShadowVolumeVS.glsl +20 -20
- package/Source/Shaders/PolylineShadowVolumeVS.js +20 -20
- package/Source/Shaders/PolylineVS.glsl +17 -17
- package/Source/Shaders/PolylineVS.js +17 -17
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.js +4 -4
- package/Source/Shaders/PostProcessStages/AdditiveBlend.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AdditiveBlend.js +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +4 -4
- package/Source/Shaders/PostProcessStages/BlackAndWhite.glsl +4 -4
- package/Source/Shaders/PostProcessStages/BlackAndWhite.js +4 -4
- package/Source/Shaders/PostProcessStages/BloomComposite.glsl +5 -5
- package/Source/Shaders/PostProcessStages/BloomComposite.js +5 -5
- package/Source/Shaders/PostProcessStages/BrightPass.glsl +3 -3
- package/Source/Shaders/PostProcessStages/BrightPass.js +3 -3
- package/Source/Shaders/PostProcessStages/Brightness.glsl +3 -3
- package/Source/Shaders/PostProcessStages/Brightness.js +3 -3
- package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.glsl +5 -5
- package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.js +5 -5
- package/Source/Shaders/PostProcessStages/ContrastBias.glsl +3 -3
- package/Source/Shaders/PostProcessStages/ContrastBias.js +3 -3
- package/Source/Shaders/PostProcessStages/DepthOfField.glsl +2 -2
- package/Source/Shaders/PostProcessStages/DepthOfField.js +2 -2
- package/Source/Shaders/PostProcessStages/DepthView.glsl +2 -2
- package/Source/Shaders/PostProcessStages/DepthView.js +2 -2
- package/Source/Shaders/PostProcessStages/DepthViewPacked.glsl +3 -3
- package/Source/Shaders/PostProcessStages/DepthViewPacked.js +3 -3
- package/Source/Shaders/PostProcessStages/EdgeDetection.glsl +7 -7
- package/Source/Shaders/PostProcessStages/EdgeDetection.js +7 -7
- package/Source/Shaders/PostProcessStages/FXAA.glsl +3 -3
- package/Source/Shaders/PostProcessStages/FXAA.js +3 -3
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.glsl +4 -4
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.js +4 -4
- package/Source/Shaders/PostProcessStages/GaussianBlur1D.glsl +5 -5
- package/Source/Shaders/PostProcessStages/GaussianBlur1D.js +5 -5
- package/Source/Shaders/PostProcessStages/LensFlare.glsl +13 -13
- package/Source/Shaders/PostProcessStages/LensFlare.js +13 -13
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.glsl +4 -4
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.js +4 -4
- package/Source/Shaders/PostProcessStages/NightVision.glsl +3 -3
- package/Source/Shaders/PostProcessStages/NightVision.js +3 -3
- package/Source/Shaders/PostProcessStages/PassThrough.glsl +2 -2
- package/Source/Shaders/PostProcessStages/PassThrough.js +2 -2
- package/Source/Shaders/PostProcessStages/PassThroughDepth.glsl +2 -2
- package/Source/Shaders/PostProcessStages/PassThroughDepth.js +2 -2
- package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.glsl +7 -9
- package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.js +8 -10
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.glsl +4 -4
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.js +4 -4
- package/Source/Shaders/PostProcessStages/Silhouette.glsl +4 -4
- package/Source/Shaders/PostProcessStages/Silhouette.js +4 -4
- package/Source/Shaders/ReprojectWebMercatorFS.glsl +2 -2
- package/Source/Shaders/ReprojectWebMercatorFS.js +2 -2
- package/Source/Shaders/ReprojectWebMercatorVS.glsl +3 -3
- package/Source/Shaders/ReprojectWebMercatorVS.js +3 -3
- package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +19 -23
- package/Source/Shaders/ShadowVolumeAppearanceFS.js +20 -24
- package/Source/Shaders/ShadowVolumeAppearanceVS.glsl +12 -12
- package/Source/Shaders/ShadowVolumeAppearanceVS.js +12 -12
- package/Source/Shaders/ShadowVolumeFS.glsl +2 -6
- package/Source/Shaders/ShadowVolumeFS.js +3 -7
- package/Source/Shaders/SkyAtmosphereFS.glsl +6 -6
- package/Source/Shaders/SkyAtmosphereFS.js +6 -6
- package/Source/Shaders/SkyAtmosphereVS.glsl +6 -6
- package/Source/Shaders/SkyAtmosphereVS.js +6 -6
- package/Source/Shaders/SkyBoxFS.glsl +3 -3
- package/Source/Shaders/SkyBoxFS.js +3 -3
- package/Source/Shaders/SkyBoxVS.glsl +2 -2
- package/Source/Shaders/SkyBoxVS.js +2 -2
- package/Source/Shaders/SunFS.glsl +3 -3
- package/Source/Shaders/SunFS.js +3 -3
- package/Source/Shaders/SunTextureFS.glsl +2 -2
- package/Source/Shaders/SunTextureFS.js +2 -2
- package/Source/Shaders/SunVS.glsl +2 -2
- package/Source/Shaders/SunVS.js +2 -2
- package/Source/Shaders/Vector3DTileClampedPolylinesFS.glsl +9 -13
- package/Source/Shaders/Vector3DTileClampedPolylinesFS.js +9 -13
- package/Source/Shaders/Vector3DTileClampedPolylinesVS.glsl +12 -12
- package/Source/Shaders/Vector3DTileClampedPolylinesVS.js +12 -12
- package/Source/Shaders/Vector3DTilePolylinesVS.glsl +5 -5
- package/Source/Shaders/Vector3DTilePolylinesVS.js +5 -5
- package/Source/Shaders/VectorTileVS.glsl +2 -2
- package/Source/Shaders/VectorTileVS.js +2 -2
- package/Source/Shaders/ViewportQuadFS.glsl +2 -2
- package/Source/Shaders/ViewportQuadFS.js +2 -2
- package/Source/Shaders/ViewportQuadVS.glsl +3 -3
- package/Source/Shaders/ViewportQuadVS.js +3 -3
- package/Source/Shaders/Voxels/IntersectBox.glsl +79 -0
- package/Source/Shaders/Voxels/IntersectBox.js +81 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +70 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.js +72 -0
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +273 -0
- package/Source/Shaders/Voxels/IntersectCylinder.js +275 -0
- package/Source/Shaders/Voxels/IntersectDepth.glsl +23 -0
- package/Source/Shaders/Voxels/IntersectDepth.js +25 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +347 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +349 -0
- package/Source/Shaders/Voxels/Intersection.glsl +54 -0
- package/Source/Shaders/Voxels/Intersection.js +56 -0
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +151 -0
- package/Source/Shaders/Voxels/IntersectionUtils.js +153 -0
- package/Source/Shaders/Voxels/Megatexture.glsl +136 -0
- package/Source/Shaders/Voxels/Megatexture.js +138 -0
- package/Source/Shaders/Voxels/Octree.glsl +221 -0
- package/Source/Shaders/Voxels/Octree.js +223 -0
- package/Source/Shaders/Voxels/VoxelFS.glsl +150 -0
- package/Source/Shaders/Voxels/VoxelFS.js +152 -0
- package/Source/Shaders/Voxels/VoxelVS.glsl +11 -0
- package/Source/Shaders/Voxels/VoxelVS.js +13 -0
- package/Source/Shaders/Voxels/convertUvToBox.glsl +16 -0
- package/Source/Shaders/Voxels/convertUvToBox.js +18 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +75 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.js +77 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +130 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +132 -0
- package/Source/ThirdParty/Workers/z-worker-pako.js +0 -0
- package/Source/WorkersES6/decodeDraco.js +9 -1
- package/index.d.ts +3148 -2297
- package/index.js +1118 -1085
- package/package.json +3 -4
- package/Build/Workers/PolygonPipeline-774a8aaf.js +0 -1341
- package/Source/Renderer/modernizeShader.js +0 -242
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#ifdef INSTANCED
|
|
2
|
-
|
|
2
|
+
in vec2 direction;
|
|
3
3
|
#endif
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
in vec4 positionHighAndScale;
|
|
5
|
+
in vec4 positionLowAndRotation;
|
|
6
|
+
in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)
|
|
7
|
+
in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width
|
|
8
|
+
in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free
|
|
9
|
+
in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)
|
|
10
|
+
in vec4 scaleByDistance; // near, nearScale, far, farScale
|
|
11
|
+
in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale
|
|
12
|
+
in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions
|
|
13
|
+
in vec2 sdf; // sdf outline color (rgb) and width (w)
|
|
14
14
|
#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)
|
|
15
|
-
|
|
15
|
+
in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates
|
|
16
16
|
#endif
|
|
17
17
|
#ifdef VECTOR_TILE
|
|
18
|
-
|
|
18
|
+
in float a_batchId;
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
out vec2 v_textureCoordinates;
|
|
22
22
|
#ifdef FRAGMENT_DEPTH_CHECK
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
out vec4 v_textureCoordinateBounds;
|
|
24
|
+
out vec4 v_originTextureCoordinateAndTranslate;
|
|
25
|
+
out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
|
|
26
|
+
out mat2 v_rotationMatrix;
|
|
27
27
|
#endif
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
out vec4 v_pickColor;
|
|
30
|
+
out vec4 v_color;
|
|
31
31
|
#ifdef SDF
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
out vec4 v_outlineColor;
|
|
33
|
+
out float v_outlineWidth;
|
|
34
34
|
#endif
|
|
35
35
|
|
|
36
36
|
const float UPPER_BOUND = 32768.0;
|
|
@@ -67,7 +67,7 @@ vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 dir
|
|
|
67
67
|
float angle = rotation;
|
|
68
68
|
if (validAlignedAxis)
|
|
69
69
|
{
|
|
70
|
-
vec4 projectedAlignedAxis =
|
|
70
|
+
vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
|
|
71
71
|
angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
|
|
72
72
|
(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
|
|
73
73
|
}
|
|
@@ -95,7 +95,7 @@ float getGlobeDepth(vec4 positionEC)
|
|
|
95
95
|
{
|
|
96
96
|
vec4 posWC = czm_eyeToWindowCoordinates(positionEC);
|
|
97
97
|
|
|
98
|
-
float globeDepth = czm_unpackDepth(
|
|
98
|
+
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));
|
|
99
99
|
|
|
100
100
|
if (globeDepth == 0.0)
|
|
101
101
|
{
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
2
|
export default "#ifdef INSTANCED\n\
|
|
3
|
-
|
|
3
|
+
in vec2 direction;\n\
|
|
4
4
|
#endif\n\
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
in vec4 positionHighAndScale;\n\
|
|
6
|
+
in vec4 positionLowAndRotation;\n\
|
|
7
|
+
in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\n\
|
|
8
|
+
in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\n\
|
|
9
|
+
in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\n\
|
|
10
|
+
in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\n\
|
|
11
|
+
in vec4 scaleByDistance; // near, nearScale, far, farScale\n\
|
|
12
|
+
in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\n\
|
|
13
|
+
in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\n\
|
|
14
|
+
in vec2 sdf; // sdf outline color (rgb) and width (w)\n\
|
|
15
15
|
#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n\
|
|
16
|
-
|
|
16
|
+
in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n\
|
|
17
17
|
#endif\n\
|
|
18
18
|
#ifdef VECTOR_TILE\n\
|
|
19
|
-
|
|
19
|
+
in float a_batchId;\n\
|
|
20
20
|
#endif\n\
|
|
21
21
|
\n\
|
|
22
|
-
|
|
22
|
+
out vec2 v_textureCoordinates;\n\
|
|
23
23
|
#ifdef FRAGMENT_DEPTH_CHECK\n\
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
out vec4 v_textureCoordinateBounds;\n\
|
|
25
|
+
out vec4 v_originTextureCoordinateAndTranslate;\n\
|
|
26
|
+
out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\n\
|
|
27
|
+
out mat2 v_rotationMatrix;\n\
|
|
28
28
|
#endif\n\
|
|
29
29
|
\n\
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
out vec4 v_pickColor;\n\
|
|
31
|
+
out vec4 v_color;\n\
|
|
32
32
|
#ifdef SDF\n\
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
out vec4 v_outlineColor;\n\
|
|
34
|
+
out float v_outlineWidth;\n\
|
|
35
35
|
#endif\n\
|
|
36
36
|
\n\
|
|
37
37
|
const float UPPER_BOUND = 32768.0;\n\
|
|
@@ -68,7 +68,7 @@ vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 dir
|
|
|
68
68
|
float angle = rotation;\n\
|
|
69
69
|
if (validAlignedAxis)\n\
|
|
70
70
|
{\n\
|
|
71
|
-
vec4 projectedAlignedAxis =
|
|
71
|
+
vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);\n\
|
|
72
72
|
angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n\
|
|
73
73
|
(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n\
|
|
74
74
|
}\n\
|
|
@@ -96,7 +96,7 @@ float getGlobeDepth(vec4 positionEC)\n\
|
|
|
96
96
|
{\n\
|
|
97
97
|
vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\
|
|
98
98
|
\n\
|
|
99
|
-
float globeDepth = czm_unpackDepth(
|
|
99
|
+
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\
|
|
100
100
|
\n\
|
|
101
101
|
if (globeDepth == 0.0)\n\
|
|
102
102
|
{\n\
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
in vec2 v_textureCoordinates;
|
|
2
2
|
const float M_PI = 3.141592653589793;
|
|
3
3
|
|
|
4
4
|
float vdcRadicalInverse(int i)
|
|
@@ -79,5 +79,5 @@ vec2 integrateBrdf(float roughness, float NdotV)
|
|
|
79
79
|
|
|
80
80
|
void main()
|
|
81
81
|
{
|
|
82
|
-
|
|
82
|
+
out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
|
|
83
83
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
-
export default "
|
|
2
|
+
export default "in vec2 v_textureCoordinates;\n\
|
|
3
3
|
const float M_PI = 3.141592653589793;\n\
|
|
4
4
|
\n\
|
|
5
5
|
float vdcRadicalInverse(int i)\n\
|
|
@@ -80,6 +80,6 @@ vec2 integrateBrdf(float roughness, float NdotV)\n\
|
|
|
80
80
|
\n\
|
|
81
81
|
void main()\n\
|
|
82
82
|
{\n\
|
|
83
|
-
|
|
83
|
+
out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n\
|
|
84
84
|
}\n\
|
|
85
85
|
";
|
|
@@ -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#VOXELS}\n\
|
|
4
|
+
*\n\
|
|
5
|
+
* @name czm_passVoxels\n\
|
|
6
|
+
* @glslConstant\n\
|
|
7
|
+
*\n\
|
|
8
|
+
* @see czm_pass\n\
|
|
9
|
+
*/\n\
|
|
10
|
+
const float czm_passVoxels = 9.0;\n\
|
|
11
|
+
";
|
|
@@ -22,6 +22,7 @@ import czm_passOpaque from './Constants/passOpaque.js'
|
|
|
22
22
|
import czm_passOverlay from './Constants/passOverlay.js'
|
|
23
23
|
import czm_passTerrainClassification from './Constants/passTerrainClassification.js'
|
|
24
24
|
import czm_passTranslucent from './Constants/passTranslucent.js'
|
|
25
|
+
import czm_passVoxels from './Constants/passVoxels.js'
|
|
25
26
|
import czm_pi from './Constants/pi.js'
|
|
26
27
|
import czm_piOverFour from './Constants/piOverFour.js'
|
|
27
28
|
import czm_piOverSix from './Constants/piOverSix.js'
|
|
@@ -45,6 +46,12 @@ import czm_pbrParameters from './Structs/pbrParameters.js'
|
|
|
45
46
|
import czm_ray from './Structs/ray.js'
|
|
46
47
|
import czm_raySegment from './Structs/raySegment.js'
|
|
47
48
|
import czm_shadowParameters from './Structs/shadowParameters.js'
|
|
49
|
+
import czm_HSBToRGB from './Functions/HSBToRGB.js'
|
|
50
|
+
import czm_HSLToRGB from './Functions/HSLToRGB.js'
|
|
51
|
+
import czm_RGBToHSB from './Functions/RGBToHSB.js'
|
|
52
|
+
import czm_RGBToHSL from './Functions/RGBToHSL.js'
|
|
53
|
+
import czm_RGBToXYZ from './Functions/RGBToXYZ.js'
|
|
54
|
+
import czm_XYZToRGB from './Functions/XYZToRGB.js'
|
|
48
55
|
import czm_acesTonemapping from './Functions/acesTonemapping.js'
|
|
49
56
|
import czm_alphaWeight from './Functions/alphaWeight.js'
|
|
50
57
|
import czm_antialias from './Functions/antialias.js'
|
|
@@ -75,15 +82,13 @@ import czm_getDefaultMaterial from './Functions/getDefaultMaterial.js'
|
|
|
75
82
|
import czm_getLambertDiffuse from './Functions/getLambertDiffuse.js'
|
|
76
83
|
import czm_getSpecular from './Functions/getSpecular.js'
|
|
77
84
|
import czm_getWaterNoise from './Functions/getWaterNoise.js'
|
|
78
|
-
import czm_HSBToRGB from './Functions/HSBToRGB.js'
|
|
79
|
-
import czm_HSLToRGB from './Functions/HSLToRGB.js'
|
|
80
85
|
import czm_hue from './Functions/hue.js'
|
|
81
86
|
import czm_inverseGamma from './Functions/inverseGamma.js'
|
|
82
87
|
import czm_isEmpty from './Functions/isEmpty.js'
|
|
83
88
|
import czm_isFull from './Functions/isFull.js'
|
|
84
89
|
import czm_latitudeToWebMercatorFraction from './Functions/latitudeToWebMercatorFraction.js'
|
|
85
|
-
import czm_linearToSrgb from './Functions/linearToSrgb.js'
|
|
86
90
|
import czm_lineDistance from './Functions/lineDistance.js'
|
|
91
|
+
import czm_linearToSrgb from './Functions/linearToSrgb.js'
|
|
87
92
|
import czm_luminance from './Functions/luminance.js'
|
|
88
93
|
import czm_metersPerPixel from './Functions/metersPerPixel.js'
|
|
89
94
|
import czm_modelToWindowCoordinates from './Functions/modelToWindowCoordinates.js'
|
|
@@ -102,9 +107,6 @@ import czm_raySphereIntersectionInterval from './Functions/raySphereIntersection
|
|
|
102
107
|
import czm_readDepth from './Functions/readDepth.js'
|
|
103
108
|
import czm_readNonPerspective from './Functions/readNonPerspective.js'
|
|
104
109
|
import czm_reverseLogDepth from './Functions/reverseLogDepth.js'
|
|
105
|
-
import czm_RGBToHSB from './Functions/RGBToHSB.js'
|
|
106
|
-
import czm_RGBToHSL from './Functions/RGBToHSL.js'
|
|
107
|
-
import czm_RGBToXYZ from './Functions/RGBToXYZ.js'
|
|
108
110
|
import czm_round from './Functions/round.js'
|
|
109
111
|
import czm_sampleOctahedralProjection from './Functions/sampleOctahedralProjection.js'
|
|
110
112
|
import czm_saturation from './Functions/saturation.js'
|
|
@@ -114,6 +116,7 @@ import czm_signNotZero from './Functions/signNotZero.js'
|
|
|
114
116
|
import czm_sphericalHarmonics from './Functions/sphericalHarmonics.js'
|
|
115
117
|
import czm_srgbToLinear from './Functions/srgbToLinear.js'
|
|
116
118
|
import czm_tangentToEyeSpaceMatrix from './Functions/tangentToEyeSpaceMatrix.js'
|
|
119
|
+
import czm_textureCube from './Functions/textureCube.js'
|
|
117
120
|
import czm_transformPlane from './Functions/transformPlane.js'
|
|
118
121
|
import czm_translateRelativeToEye from './Functions/translateRelativeToEye.js'
|
|
119
122
|
import czm_translucentPhong from './Functions/translucentPhong.js'
|
|
@@ -127,7 +130,6 @@ import czm_windowToEyeCoordinates from './Functions/windowToEyeCoordinates.js'
|
|
|
127
130
|
import czm_writeDepthClamp from './Functions/writeDepthClamp.js'
|
|
128
131
|
import czm_writeLogDepth from './Functions/writeLogDepth.js'
|
|
129
132
|
import czm_writeNonPerspective from './Functions/writeNonPerspective.js'
|
|
130
|
-
import czm_XYZToRGB from './Functions/XYZToRGB.js'
|
|
131
133
|
|
|
132
134
|
export default {
|
|
133
135
|
czm_degreesPerRadian : czm_degreesPerRadian,
|
|
@@ -153,6 +155,7 @@ export default {
|
|
|
153
155
|
czm_passOverlay : czm_passOverlay,
|
|
154
156
|
czm_passTerrainClassification : czm_passTerrainClassification,
|
|
155
157
|
czm_passTranslucent : czm_passTranslucent,
|
|
158
|
+
czm_passVoxels : czm_passVoxels,
|
|
156
159
|
czm_pi : czm_pi,
|
|
157
160
|
czm_piOverFour : czm_piOverFour,
|
|
158
161
|
czm_piOverSix : czm_piOverSix,
|
|
@@ -176,6 +179,12 @@ export default {
|
|
|
176
179
|
czm_ray : czm_ray,
|
|
177
180
|
czm_raySegment : czm_raySegment,
|
|
178
181
|
czm_shadowParameters : czm_shadowParameters,
|
|
182
|
+
czm_HSBToRGB : czm_HSBToRGB,
|
|
183
|
+
czm_HSLToRGB : czm_HSLToRGB,
|
|
184
|
+
czm_RGBToHSB : czm_RGBToHSB,
|
|
185
|
+
czm_RGBToHSL : czm_RGBToHSL,
|
|
186
|
+
czm_RGBToXYZ : czm_RGBToXYZ,
|
|
187
|
+
czm_XYZToRGB : czm_XYZToRGB,
|
|
179
188
|
czm_acesTonemapping : czm_acesTonemapping,
|
|
180
189
|
czm_alphaWeight : czm_alphaWeight,
|
|
181
190
|
czm_antialias : czm_antialias,
|
|
@@ -206,15 +215,13 @@ export default {
|
|
|
206
215
|
czm_getLambertDiffuse : czm_getLambertDiffuse,
|
|
207
216
|
czm_getSpecular : czm_getSpecular,
|
|
208
217
|
czm_getWaterNoise : czm_getWaterNoise,
|
|
209
|
-
czm_HSBToRGB : czm_HSBToRGB,
|
|
210
|
-
czm_HSLToRGB : czm_HSLToRGB,
|
|
211
218
|
czm_hue : czm_hue,
|
|
212
219
|
czm_inverseGamma : czm_inverseGamma,
|
|
213
220
|
czm_isEmpty : czm_isEmpty,
|
|
214
221
|
czm_isFull : czm_isFull,
|
|
215
222
|
czm_latitudeToWebMercatorFraction : czm_latitudeToWebMercatorFraction,
|
|
216
|
-
czm_linearToSrgb : czm_linearToSrgb,
|
|
217
223
|
czm_lineDistance : czm_lineDistance,
|
|
224
|
+
czm_linearToSrgb : czm_linearToSrgb,
|
|
218
225
|
czm_luminance : czm_luminance,
|
|
219
226
|
czm_metersPerPixel : czm_metersPerPixel,
|
|
220
227
|
czm_modelToWindowCoordinates : czm_modelToWindowCoordinates,
|
|
@@ -233,9 +240,6 @@ export default {
|
|
|
233
240
|
czm_readDepth : czm_readDepth,
|
|
234
241
|
czm_readNonPerspective : czm_readNonPerspective,
|
|
235
242
|
czm_reverseLogDepth : czm_reverseLogDepth,
|
|
236
|
-
czm_RGBToHSB : czm_RGBToHSB,
|
|
237
|
-
czm_RGBToHSL : czm_RGBToHSL,
|
|
238
|
-
czm_RGBToXYZ : czm_RGBToXYZ,
|
|
239
243
|
czm_round : czm_round,
|
|
240
244
|
czm_sampleOctahedralProjection : czm_sampleOctahedralProjection,
|
|
241
245
|
czm_saturation : czm_saturation,
|
|
@@ -245,6 +249,7 @@ export default {
|
|
|
245
249
|
czm_sphericalHarmonics : czm_sphericalHarmonics,
|
|
246
250
|
czm_srgbToLinear : czm_srgbToLinear,
|
|
247
251
|
czm_tangentToEyeSpaceMatrix : czm_tangentToEyeSpaceMatrix,
|
|
252
|
+
czm_textureCube : czm_textureCube,
|
|
248
253
|
czm_transformPlane : czm_transformPlane,
|
|
249
254
|
czm_translateRelativeToEye : czm_translateRelativeToEye,
|
|
250
255
|
czm_translucentPhong : czm_translucentPhong,
|
|
@@ -257,6 +262,5 @@ export default {
|
|
|
257
262
|
czm_windowToEyeCoordinates : czm_windowToEyeCoordinates,
|
|
258
263
|
czm_writeDepthClamp : czm_writeDepthClamp,
|
|
259
264
|
czm_writeLogDepth : czm_writeLogDepth,
|
|
260
|
-
czm_writeNonPerspective : czm_writeNonPerspective
|
|
261
|
-
czm_XYZToRGB : czm_XYZToRGB
|
|
265
|
+
czm_writeNonPerspective : czm_writeNonPerspective
|
|
262
266
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// emulated noperspective
|
|
2
|
-
#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)
|
|
3
|
-
|
|
2
|
+
#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
|
|
3
|
+
out float v_WindowZ;
|
|
4
4
|
#endif
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -36,7 +36,7 @@ varying float v_WindowZ;
|
|
|
36
36
|
vec4 czm_depthClamp(vec4 coords)
|
|
37
37
|
{
|
|
38
38
|
#ifndef LOG_DEPTH
|
|
39
|
-
#
|
|
39
|
+
#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
|
|
40
40
|
v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
|
|
41
41
|
coords.z = 0.0;
|
|
42
42
|
#else
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
2
|
export default "// emulated noperspective\n\
|
|
3
|
-
#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n\
|
|
4
|
-
|
|
3
|
+
#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)\n\
|
|
4
|
+
out float v_WindowZ;\n\
|
|
5
5
|
#endif\n\
|
|
6
6
|
\n\
|
|
7
7
|
/**\n\
|
|
@@ -37,7 +37,7 @@ varying float v_WindowZ;\n\
|
|
|
37
37
|
vec4 czm_depthClamp(vec4 coords)\n\
|
|
38
38
|
{\n\
|
|
39
39
|
#ifndef LOG_DEPTH\n\
|
|
40
|
-
#
|
|
40
|
+
#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)\n\
|
|
41
41
|
v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n\
|
|
42
42
|
coords.z = 0.0;\n\
|
|
43
43
|
#else\n\
|
|
@@ -27,10 +27,10 @@ vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRa
|
|
|
27
27
|
uv1 = fract(uv1);
|
|
28
28
|
uv2 = fract(uv2);
|
|
29
29
|
uv3 = fract(uv3);
|
|
30
|
-
vec4 noise = (
|
|
31
|
-
(
|
|
32
|
-
(
|
|
33
|
-
(
|
|
30
|
+
vec4 noise = (texture(normalMap, uv0)) +
|
|
31
|
+
(texture(normalMap, uv1)) +
|
|
32
|
+
(texture(normalMap, uv2)) +
|
|
33
|
+
(texture(normalMap, uv3));
|
|
34
34
|
|
|
35
35
|
// average and scale to between -1 and 1
|
|
36
36
|
return ((noise / 4.0) - 0.5) * 2.0;
|
|
@@ -28,10 +28,10 @@ vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRa
|
|
|
28
28
|
uv1 = fract(uv1);\n\
|
|
29
29
|
uv2 = fract(uv2);\n\
|
|
30
30
|
uv3 = fract(uv3);\n\
|
|
31
|
-
vec4 noise = (
|
|
32
|
-
(
|
|
33
|
-
(
|
|
34
|
-
(
|
|
31
|
+
vec4 noise = (texture(normalMap, uv0)) +\n\
|
|
32
|
+
(texture(normalMap, uv1)) +\n\
|
|
33
|
+
(texture(normalMap, uv2)) +\n\
|
|
34
|
+
(texture(normalMap, uv3));\n\
|
|
35
35
|
\n\
|
|
36
36
|
// average and scale to between -1 and 1\n\
|
|
37
37
|
return ((noise / 4.0) - 0.5) * 2.0;\n\
|
|
@@ -23,7 +23,7 @@ float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm
|
|
|
23
23
|
* vec3 positionToEyeEC = // ...
|
|
24
24
|
* czm_material material = // ...
|
|
25
25
|
* vec3 lightDirectionEC = // ...
|
|
26
|
-
*
|
|
26
|
+
* out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);
|
|
27
27
|
*
|
|
28
28
|
* @see czm_getMaterial
|
|
29
29
|
*/
|
|
@@ -24,7 +24,7 @@ float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm
|
|
|
24
24
|
* vec3 positionToEyeEC = // ...\n\
|
|
25
25
|
* czm_material material = // ...\n\
|
|
26
26
|
* vec3 lightDirectionEC = // ...\n\
|
|
27
|
-
*
|
|
27
|
+
* out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n\
|
|
28
28
|
*\n\
|
|
29
29
|
* @see czm_getMaterial\n\
|
|
30
30
|
*/\n\
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
2
|
export default "float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n\
|
|
3
3
|
{\n\
|
|
4
|
-
return czm_reverseLogDepth(
|
|
4
|
+
return czm_reverseLogDepth(texture(depthTexture, texCoords).r);\n\
|
|
5
5
|
}\n\
|
|
6
6
|
";
|
|
@@ -32,10 +32,10 @@ vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 te
|
|
|
32
32
|
|
|
33
33
|
// Do bilinear filtering
|
|
34
34
|
#ifndef OES_texture_float_linear
|
|
35
|
-
vec3 color1 =
|
|
36
|
-
vec3 color2 =
|
|
37
|
-
vec3 color3 =
|
|
38
|
-
vec3 color4 =
|
|
35
|
+
vec3 color1 = texture(projectedMap, coord + vec2(0.0, pixel.y)).rgb;
|
|
36
|
+
vec3 color2 = texture(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;
|
|
37
|
+
vec3 color3 = texture(projectedMap, coord + pixel).rgb;
|
|
38
|
+
vec3 color4 = texture(projectedMap, coord).rgb;
|
|
39
39
|
|
|
40
40
|
vec2 texturePosition = coord * textureSize;
|
|
41
41
|
|
|
@@ -47,7 +47,7 @@ vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 te
|
|
|
47
47
|
|
|
48
48
|
vec3 color = mix(average1, average2, fv);
|
|
49
49
|
#else
|
|
50
|
-
vec3 color =
|
|
50
|
+
vec3 color = texture(projectedMap, coord).rgb;
|
|
51
51
|
#endif
|
|
52
52
|
|
|
53
53
|
return color;
|
|
@@ -33,10 +33,10 @@ vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 te
|
|
|
33
33
|
\n\
|
|
34
34
|
// Do bilinear filtering\n\
|
|
35
35
|
#ifndef OES_texture_float_linear\n\
|
|
36
|
-
vec3 color1 =
|
|
37
|
-
vec3 color2 =
|
|
38
|
-
vec3 color3 =
|
|
39
|
-
vec3 color4 =
|
|
36
|
+
vec3 color1 = texture(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\n\
|
|
37
|
+
vec3 color2 = texture(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\n\
|
|
38
|
+
vec3 color3 = texture(projectedMap, coord + pixel).rgb;\n\
|
|
39
|
+
vec3 color4 = texture(projectedMap, coord).rgb;\n\
|
|
40
40
|
\n\
|
|
41
41
|
vec2 texturePosition = coord * textureSize;\n\
|
|
42
42
|
\n\
|
|
@@ -48,7 +48,7 @@ vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 te
|
|
|
48
48
|
\n\
|
|
49
49
|
vec3 color = mix(average1, average2, fv);\n\
|
|
50
50
|
#else\n\
|
|
51
|
-
vec3 color =
|
|
51
|
+
vec3 color = texture(projectedMap, coord).rgb;\n\
|
|
52
52
|
#endif\n\
|
|
53
53
|
\n\
|
|
54
54
|
return color;\n\
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
|
|
3
3
|
{
|
|
4
|
-
return czm_unpackDepth(
|
|
4
|
+
return czm_unpackDepth(czm_textureCube(shadowMap, d));
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
|
|
8
8
|
{
|
|
9
9
|
#ifdef USE_SHADOW_DEPTH_TEXTURE
|
|
10
|
-
return
|
|
10
|
+
return texture(shadowMap, uv).r;
|
|
11
11
|
#else
|
|
12
|
-
return czm_unpackDepth(
|
|
12
|
+
return czm_unpackDepth(texture(shadowMap, uv));
|
|
13
13
|
#endif
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
export default "\n\
|
|
3
3
|
float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)\n\
|
|
4
4
|
{\n\
|
|
5
|
-
return czm_unpackDepth(
|
|
5
|
+
return czm_unpackDepth(czm_textureCube(shadowMap, d));\n\
|
|
6
6
|
}\n\
|
|
7
7
|
\n\
|
|
8
8
|
float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)\n\
|
|
9
9
|
{\n\
|
|
10
10
|
#ifdef USE_SHADOW_DEPTH_TEXTURE\n\
|
|
11
|
-
return
|
|
11
|
+
return texture(shadowMap, uv).r;\n\
|
|
12
12
|
#else\n\
|
|
13
|
-
return czm_unpackDepth(
|
|
13
|
+
return czm_unpackDepth(texture(shadowMap, uv));\n\
|
|
14
14
|
#endif\n\
|
|
15
15
|
}\n\
|
|
16
16
|
\n\
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);
|
|
15
|
-
* vec3 normal = tangentToEye *
|
|
15
|
+
* vec3 normal = tangentToEye * texture(normalMap, st).xyz;
|
|
16
16
|
*/
|
|
17
17
|
mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
|
|
18
18
|
{
|
|
@@ -13,7 +13,7 @@ export default "/**\n\
|
|
|
13
13
|
*\n\
|
|
14
14
|
* @example\n\
|
|
15
15
|
* mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n\
|
|
16
|
-
* vec3 normal = tangentToEye *
|
|
16
|
+
* vec3 normal = tangentToEye * texture(normalMap, st).xyz;\n\
|
|
17
17
|
*/\n\
|
|
18
18
|
mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n\
|
|
19
19
|
{\n\
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A wrapper around the texture (WebGL2) / textureCube (WebGL1)
|
|
3
|
+
* function to allow for WebGL 1 support.
|
|
4
|
+
*
|
|
5
|
+
* @name czm_textureCube
|
|
6
|
+
* @glslFunction
|
|
7
|
+
*
|
|
8
|
+
* @param {samplerCube} sampler The sampler.
|
|
9
|
+
* @param {vec3} p The coordinates to sample the texture at.
|
|
10
|
+
*/
|
|
11
|
+
vec4 czm_textureCube(samplerCube sampler, vec3 p) {
|
|
12
|
+
#if __VERSION__ == 300
|
|
13
|
+
return texture(sampler, p);
|
|
14
|
+
#else
|
|
15
|
+
return textureCube(sampler, p);
|
|
16
|
+
#endif
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
+
export default "/**\n\
|
|
3
|
+
* A wrapper around the texture (WebGL2) / textureCube (WebGL1)\n\
|
|
4
|
+
* function to allow for WebGL 1 support.\n\
|
|
5
|
+
* \n\
|
|
6
|
+
* @name czm_textureCube\n\
|
|
7
|
+
* @glslFunction\n\
|
|
8
|
+
*\n\
|
|
9
|
+
* @param {samplerCube} sampler The sampler.\n\
|
|
10
|
+
* @param {vec3} p The coordinates to sample the texture at.\n\
|
|
11
|
+
*/\n\
|
|
12
|
+
vec4 czm_textureCube(samplerCube sampler, vec3 p) {\n\
|
|
13
|
+
#if __VERSION__ == 300\n\
|
|
14
|
+
return texture(sampler, p);\n\
|
|
15
|
+
#else \n\
|
|
16
|
+
return textureCube(sampler, p);\n\
|
|
17
|
+
#endif\n\
|
|
18
|
+
}";
|
|
@@ -18,8 +18,8 @@ export default "/**\n\
|
|
|
18
18
|
* @returns {vec3} The position translated to be relative to the camera's position.\n\
|
|
19
19
|
*\n\
|
|
20
20
|
* @example\n\
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* in vec3 positionHigh;\n\
|
|
22
|
+
* in vec3 positionLow;\n\
|
|
23
23
|
*\n\
|
|
24
24
|
* void main()\n\
|
|
25
25
|
* {\n\
|