@cesium/engine 1.1.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/{AxisAlignedBoundingBox-a4321399.js → AxisAlignedBoundingBox-47525601.js} +1 -1
- package/Build/Workers/{BoundingRectangle-80d8801f.js → BoundingRectangle-93b263ac.js} +1 -1
- package/Build/Workers/{BoxGeometry-33c10a4f.js → BoxGeometry-8c4b4125.js} +1 -1
- package/Build/Workers/{Color-1bf9a6e0.js → Color-52c60ed7.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-5c5b981b.js → CoplanarPolygonGeometryLibrary-33c4c1f8.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-7cbae7a0.js → CorridorGeometryLibrary-5039cd8e.js} +1 -1
- package/Build/Workers/{CylinderGeometry-42740df0.js → CylinderGeometry-3ac44974.js} +1 -1
- package/Build/Workers/{EllipseGeometry-49a3ac21.js → EllipseGeometry-a9c9b3be.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-b891b2f8.js → EllipseGeometryLibrary-855d4681.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-fbd72e07.js → EllipseOutlineGeometry-017a5929.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-a351dba8.js → EllipsoidGeometry-826e7bce.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-3e8779bf.js → EllipsoidOutlineGeometry-784dcdb5.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-cfb50678.js → EllipsoidTangentPlane-ed9443a1.js} +1 -1
- package/Build/Workers/{FrustumGeometry-c5754412.js → FrustumGeometry-9f1ee4d8.js} +1 -1
- package/Build/Workers/{GeometryAttribute-0bfd05e8.js → GeometryAttribute-334718f8.js} +1 -1
- package/Build/Workers/{GeometryPipeline-0166905d.js → GeometryPipeline-8fb0db69.js} +1 -1
- package/Build/Workers/{IntersectionTests-a93d3de9.js → IntersectionTests-27d49265.js} +1 -1
- package/Build/Workers/{OrientedBoundingBox-b450cb61.js → OrientedBoundingBox-79ee7cbb.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-f918ac26.js → PolygonGeometryLibrary-6b5a29e9.js} +1 -1
- package/Build/Workers/{PolygonPipeline-f59a8f0a.js → PolygonPipeline-21668b3f.js} +1 -1
- package/Build/Workers/{PolylinePipeline-d8e6bd9b.js → PolylinePipeline-5e2e1b21.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-125d2edf.js → PolylineVolumeGeometryLibrary-97f0b94e.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-0d7b5ed4.js → PrimitivePipeline-5640850a.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-0768db63.js → RectangleGeometryLibrary-d5457f7b.js} +1 -1
- package/Build/Workers/{TerrainEncoding-06470d7f.js → TerrainEncoding-bfdf2021.js} +1 -1
- package/Build/Workers/{Transforms-26539bce.js → Transforms-a05e5e6e.js} +17 -0
- package/Build/Workers/{WallGeometryLibrary-6167b0fc.js → WallGeometryLibrary-6db0ebb6.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +68 -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/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +1 -1
- 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/package.js +1 -1
- package/Build/Workers/transcodeKTX2.js +22 -2
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/README.md +14 -16
- package/Source/Core/FeatureDetection.js +18 -0
- package/Source/Core/Ion.js +1 -2
- package/Source/Core/PixelFormat.js +22 -2
- package/Source/Core/sampleTerrain.js +5 -0
- package/Source/Renderer/AutomaticUniforms.js +3 -3
- package/Source/Renderer/Context.js +4 -14
- 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/Cesium3DTilesVoxelProvider.js +12 -0
- package/Source/Scene/Cesium3DTileset.js +6 -1
- package/Source/Scene/ClassificationPrimitive.js +3 -8
- 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 +8 -22
- package/Source/Scene/EllipsoidPrimitive.js +0 -7
- package/Source/Scene/GlobeTranslucencyState.js +6 -6
- package/Source/Scene/GroundPolylinePrimitive.js +2 -4
- package/Source/Scene/InvertClassification.js +9 -10
- package/Source/Scene/Material.js +6 -6
- package/Source/Scene/Megatexture.js +2 -2
- package/Source/Scene/MetadataSemantic.js +8 -0
- package/Source/Scene/Model/CustomShader.js +1 -1
- package/Source/Scene/Model/FeatureIdPipelineStage.js +4 -4
- package/Source/Scene/Model/LightingModel.js +1 -1
- package/Source/Scene/Model/MetadataPipelineStage.js +1 -1
- package/Source/Scene/Model/PickingPipelineStage.js +1 -1
- package/Source/Scene/OIT.js +211 -119
- package/Source/Scene/PickDepth.js +2 -2
- package/Source/Scene/PointCloud.js +11 -11
- 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/ShadowMap.js +7 -7
- package/Source/Scene/ShadowMapShader.js +9 -9
- package/Source/Scene/ShadowVolumeAppearance.js +1 -1
- package/Source/Scene/TextureAtlas.js +5 -3
- package/Source/Scene/Vector3DTilePolylines.js +1 -1
- package/Source/Scene/Vector3DTilePrimitive.js +2 -2
- package/Source/Scene/VoxelEllipsoidShape.js +15 -7
- package/Source/Scene/VoxelPrimitive.js +4 -4
- 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/processVoxelProperties.js +1 -1
- 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 +23 -23
- package/Source/Shaders/BillboardCollectionVS.js +23 -23
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +2 -2
- package/Source/Shaders/BrdfLutGeneratorFS.js +2 -2
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- 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/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 +15 -15
- package/Source/Shaders/GlobeFS.js +15 -15
- 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 +12 -12
- package/Source/Shaders/PointPrimitiveCollectionVS.js +12 -12
- 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/IntersectDepth.glsl +1 -1
- package/Source/Shaders/Voxels/IntersectDepth.js +1 -1
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +12 -2
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +12 -2
- package/Source/Shaders/Voxels/Megatexture.glsl +1 -1
- package/Source/Shaders/Voxels/Megatexture.js +1 -1
- package/Source/Shaders/Voxels/Octree.glsl +4 -4
- package/Source/Shaders/Voxels/Octree.js +4 -4
- package/Source/Shaders/Voxels/VoxelFS.glsl +2 -2
- package/Source/Shaders/Voxels/VoxelFS.js +2 -2
- package/Source/Shaders/Voxels/VoxelVS.glsl +1 -1
- package/Source/Shaders/Voxels/VoxelVS.js +1 -1
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +5 -9
- package/Source/Shaders/Voxels/convertUvToCylinder.js +5 -9
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +3 -6
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +3 -6
- package/Source/WorkersES6/decodeDraco.js +9 -1
- package/index.d.ts +26 -12
- package/index.js +53 -52
- package/package.json +1 -1
- package/Source/Renderer/modernizeShader.js +0 -242
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
-
export default "
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export default "in vec3 v_positionEC;\n\
|
|
3
|
+
in vec3 v_normalEC;\n\
|
|
4
|
+
in vec2 v_st;\n\
|
|
5
5
|
\n\
|
|
6
6
|
void main()\n\
|
|
7
7
|
{\n\
|
|
@@ -19,9 +19,9 @@ void main()\n\
|
|
|
19
19
|
czm_material material = czm_getMaterial(materialInput);\n\
|
|
20
20
|
\n\
|
|
21
21
|
#ifdef FLAT\n\
|
|
22
|
-
|
|
22
|
+
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n\
|
|
23
23
|
#else\n\
|
|
24
|
-
|
|
24
|
+
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n\
|
|
25
25
|
#endif\n\
|
|
26
26
|
}\n\
|
|
27
27
|
";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
in vec3 position3DHigh;
|
|
2
|
+
in vec3 position3DLow;
|
|
3
|
+
in vec3 normal;
|
|
4
|
+
in vec2 st;
|
|
5
|
+
in float batchId;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
out vec3 v_positionEC;
|
|
8
|
+
out vec3 v_normalEC;
|
|
9
|
+
out vec2 v_st;
|
|
10
10
|
|
|
11
11
|
void main()
|
|
12
12
|
{
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
-
export default "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export default "in vec3 position3DHigh;\n\
|
|
3
|
+
in vec3 position3DLow;\n\
|
|
4
|
+
in vec3 normal;\n\
|
|
5
|
+
in vec2 st;\n\
|
|
6
|
+
in float batchId;\n\
|
|
7
7
|
\n\
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
out vec3 v_positionEC;\n\
|
|
9
|
+
out vec3 v_normalEC;\n\
|
|
10
|
+
out vec2 v_st;\n\
|
|
11
11
|
\n\
|
|
12
12
|
void main()\n\
|
|
13
13
|
{\n\
|
|
@@ -8,20 +8,20 @@ uniform sampler2D u_atlas;
|
|
|
8
8
|
uniform vec4 u_highlightColor;
|
|
9
9
|
#endif
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
in vec2 v_textureCoordinates;
|
|
12
|
+
in vec4 v_pickColor;
|
|
13
|
+
in vec4 v_color;
|
|
14
14
|
|
|
15
15
|
#ifdef SDF
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
in vec4 v_outlineColor;
|
|
17
|
+
in float v_outlineWidth;
|
|
18
18
|
#endif
|
|
19
19
|
|
|
20
20
|
#ifdef FRAGMENT_DEPTH_CHECK
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
in vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates
|
|
22
|
+
in vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)
|
|
23
|
+
in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
|
|
24
|
+
in mat2 v_rotationMatrix;
|
|
25
25
|
|
|
26
26
|
const float SHIFT_LEFT12 = 4096.0;
|
|
27
27
|
const float SHIFT_LEFT1 = 2.0;
|
|
@@ -45,7 +45,7 @@ float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, ve
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;
|
|
48
|
-
float logDepthOrDepth = czm_unpackDepth(
|
|
48
|
+
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
|
|
49
49
|
|
|
50
50
|
if (logDepthOrDepth == 0.0)
|
|
51
51
|
{
|
|
@@ -63,7 +63,7 @@ float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, ve
|
|
|
63
63
|
// Get the distance from the edge of a glyph at a given position sampling an SDF texture.
|
|
64
64
|
float getDistance(vec2 position)
|
|
65
65
|
{
|
|
66
|
-
return
|
|
66
|
+
return texture(u_atlas, position).r;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.
|
|
@@ -90,7 +90,7 @@ vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smo
|
|
|
90
90
|
|
|
91
91
|
void main()
|
|
92
92
|
{
|
|
93
|
-
vec4 color =
|
|
93
|
+
vec4 color = texture(u_atlas, v_textureCoordinates);
|
|
94
94
|
|
|
95
95
|
#ifdef SDF
|
|
96
96
|
float outlineWidth = v_outlineWidth;
|
|
@@ -99,7 +99,7 @@ void main()
|
|
|
99
99
|
// Get the current distance
|
|
100
100
|
float distance = getDistance(v_textureCoordinates);
|
|
101
101
|
|
|
102
|
-
#
|
|
102
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
|
|
103
103
|
float smoothing = fwidth(distance);
|
|
104
104
|
// Get an offset that is approximately half the distance to the neighbor pixels
|
|
105
105
|
// 0.354 is approximately half of 1/sqrt(2)
|
|
@@ -117,7 +117,7 @@ void main()
|
|
|
117
117
|
// Equally weight the center sample and the 4 neighboring samples
|
|
118
118
|
color = (center + color1 + color2 + color3 + color4)/5.0;
|
|
119
119
|
#else
|
|
120
|
-
//
|
|
120
|
+
// If no derivatives available (IE 10?), just do a single sample
|
|
121
121
|
float smoothing = 1.0/32.0;
|
|
122
122
|
color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
|
|
123
123
|
#endif
|
|
@@ -153,7 +153,7 @@ void main()
|
|
|
153
153
|
#ifdef VECTOR_TILE
|
|
154
154
|
color *= u_highlightColor;
|
|
155
155
|
#endif
|
|
156
|
-
|
|
156
|
+
out_FragColor = color;
|
|
157
157
|
|
|
158
158
|
#ifdef LOG_DEPTH
|
|
159
159
|
czm_writeLogDepth();
|
|
@@ -9,20 +9,20 @@ uniform sampler2D u_atlas;\n\
|
|
|
9
9
|
uniform vec4 u_highlightColor;\n\
|
|
10
10
|
#endif\n\
|
|
11
11
|
\n\
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
in vec2 v_textureCoordinates;\n\
|
|
13
|
+
in vec4 v_pickColor;\n\
|
|
14
|
+
in vec4 v_color;\n\
|
|
15
15
|
\n\
|
|
16
16
|
#ifdef SDF\n\
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
in vec4 v_outlineColor;\n\
|
|
18
|
+
in float v_outlineWidth;\n\
|
|
19
19
|
#endif\n\
|
|
20
20
|
\n\
|
|
21
21
|
#ifdef FRAGMENT_DEPTH_CHECK\n\
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
in vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates\n\
|
|
23
|
+
in vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)\n\
|
|
24
|
+
in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\n\
|
|
25
|
+
in mat2 v_rotationMatrix;\n\
|
|
26
26
|
\n\
|
|
27
27
|
const float SHIFT_LEFT12 = 4096.0;\n\
|
|
28
28
|
const float SHIFT_LEFT1 = 2.0;\n\
|
|
@@ -46,7 +46,7 @@ float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, ve
|
|
|
46
46
|
}\n\
|
|
47
47
|
\n\
|
|
48
48
|
vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\n\
|
|
49
|
-
float logDepthOrDepth = czm_unpackDepth(
|
|
49
|
+
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));\n\
|
|
50
50
|
\n\
|
|
51
51
|
if (logDepthOrDepth == 0.0)\n\
|
|
52
52
|
{\n\
|
|
@@ -64,7 +64,7 @@ float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, ve
|
|
|
64
64
|
// Get the distance from the edge of a glyph at a given position sampling an SDF texture.\n\
|
|
65
65
|
float getDistance(vec2 position)\n\
|
|
66
66
|
{\n\
|
|
67
|
-
return
|
|
67
|
+
return texture(u_atlas, position).r;\n\
|
|
68
68
|
}\n\
|
|
69
69
|
\n\
|
|
70
70
|
// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.\n\
|
|
@@ -91,7 +91,7 @@ vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smo
|
|
|
91
91
|
\n\
|
|
92
92
|
void main()\n\
|
|
93
93
|
{\n\
|
|
94
|
-
vec4 color =
|
|
94
|
+
vec4 color = texture(u_atlas, v_textureCoordinates);\n\
|
|
95
95
|
\n\
|
|
96
96
|
#ifdef SDF\n\
|
|
97
97
|
float outlineWidth = v_outlineWidth;\n\
|
|
@@ -100,7 +100,7 @@ void main()\n\
|
|
|
100
100
|
// Get the current distance\n\
|
|
101
101
|
float distance = getDistance(v_textureCoordinates);\n\
|
|
102
102
|
\n\
|
|
103
|
-
#
|
|
103
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n\
|
|
104
104
|
float smoothing = fwidth(distance);\n\
|
|
105
105
|
// Get an offset that is approximately half the distance to the neighbor pixels\n\
|
|
106
106
|
// 0.354 is approximately half of 1/sqrt(2)\n\
|
|
@@ -118,7 +118,7 @@ void main()\n\
|
|
|
118
118
|
// Equally weight the center sample and the 4 neighboring samples\n\
|
|
119
119
|
color = (center + color1 + color2 + color3 + color4)/5.0;\n\
|
|
120
120
|
#else\n\
|
|
121
|
-
//
|
|
121
|
+
// If no derivatives available (IE 10?), just do a single sample\n\
|
|
122
122
|
float smoothing = 1.0/32.0;\n\
|
|
123
123
|
color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n\
|
|
124
124
|
#endif\n\
|
|
@@ -154,7 +154,7 @@ void main()\n\
|
|
|
154
154
|
#ifdef VECTOR_TILE\n\
|
|
155
155
|
color *= u_highlightColor;\n\
|
|
156
156
|
#endif\n\
|
|
157
|
-
|
|
157
|
+
out_FragColor = color;\n\
|
|
158
158
|
\n\
|
|
159
159
|
#ifdef LOG_DEPTH\n\
|
|
160
160
|
czm_writeLogDepth();\n\
|
|
@@ -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;
|
|
@@ -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\
|
|
@@ -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
|
";
|
|
@@ -116,6 +116,7 @@ import czm_signNotZero from './Functions/signNotZero.js'
|
|
|
116
116
|
import czm_sphericalHarmonics from './Functions/sphericalHarmonics.js'
|
|
117
117
|
import czm_srgbToLinear from './Functions/srgbToLinear.js'
|
|
118
118
|
import czm_tangentToEyeSpaceMatrix from './Functions/tangentToEyeSpaceMatrix.js'
|
|
119
|
+
import czm_textureCube from './Functions/textureCube.js'
|
|
119
120
|
import czm_transformPlane from './Functions/transformPlane.js'
|
|
120
121
|
import czm_translateRelativeToEye from './Functions/translateRelativeToEye.js'
|
|
121
122
|
import czm_translucentPhong from './Functions/translucentPhong.js'
|
|
@@ -248,6 +249,7 @@ export default {
|
|
|
248
249
|
czm_sphericalHarmonics : czm_sphericalHarmonics,
|
|
249
250
|
czm_srgbToLinear : czm_srgbToLinear,
|
|
250
251
|
czm_tangentToEyeSpaceMatrix : czm_tangentToEyeSpaceMatrix,
|
|
252
|
+
czm_textureCube : czm_textureCube,
|
|
251
253
|
czm_transformPlane : czm_transformPlane,
|
|
252
254
|
czm_translateRelativeToEye : czm_translateRelativeToEye,
|
|
253
255
|
czm_translucentPhong : czm_translucentPhong,
|
|
@@ -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\
|