@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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
in vec4 positionEC;
|
|
2
2
|
|
|
3
3
|
void main()
|
|
4
4
|
{
|
|
@@ -25,7 +25,7 @@ void main()
|
|
|
25
25
|
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
|
|
26
26
|
if (!czm_isEmpty(intersection))
|
|
27
27
|
{
|
|
28
|
-
|
|
28
|
+
out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
|
|
29
29
|
}
|
|
30
30
|
else
|
|
31
31
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
-
export default "
|
|
2
|
+
export default "in vec4 positionEC;\n\
|
|
3
3
|
\n\
|
|
4
4
|
void main()\n\
|
|
5
5
|
{\n\
|
|
@@ -26,7 +26,7 @@ void main()\n\
|
|
|
26
26
|
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\
|
|
27
27
|
if (!czm_isEmpty(intersection))\n\
|
|
28
28
|
{\n\
|
|
29
|
-
|
|
29
|
+
out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n\
|
|
30
30
|
}\n\
|
|
31
31
|
else\n\
|
|
32
32
|
{\n\
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
#ifdef WRITE_DEPTH
|
|
2
|
-
#ifdef GL_EXT_frag_depth
|
|
3
|
-
#extension GL_EXT_frag_depth : enable
|
|
4
|
-
#endif
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
1
|
uniform vec3 u_radii;
|
|
8
2
|
uniform vec3 u_oneOverEllipsoidRadiiSquared;
|
|
9
3
|
|
|
10
|
-
|
|
4
|
+
in vec3 v_positionEC;
|
|
11
5
|
|
|
12
6
|
vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
|
|
13
7
|
{
|
|
@@ -89,11 +83,10 @@ void main()
|
|
|
89
83
|
// If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.
|
|
90
84
|
vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);
|
|
91
85
|
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
|
|
87
|
+
out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);
|
|
94
88
|
|
|
95
|
-
#
|
|
96
|
-
#ifdef GL_EXT_frag_depth
|
|
89
|
+
#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
|
|
97
90
|
t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
|
|
98
91
|
vec3 positionEC = czm_pointAlongRay(ray, t);
|
|
99
92
|
vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
|
|
@@ -105,8 +98,7 @@ void main()
|
|
|
105
98
|
float n = czm_depthRange.near;
|
|
106
99
|
float f = czm_depthRange.far;
|
|
107
100
|
|
|
108
|
-
|
|
109
|
-
#endif
|
|
101
|
+
gl_FragDepth = (z * (f - n) + f + n) * 0.5;
|
|
110
102
|
#endif
|
|
111
103
|
#endif
|
|
112
104
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
-
export default "
|
|
3
|
-
#ifdef GL_EXT_frag_depth\n\
|
|
4
|
-
#extension GL_EXT_frag_depth : enable\n\
|
|
5
|
-
#endif\n\
|
|
6
|
-
#endif\n\
|
|
7
|
-
\n\
|
|
8
|
-
uniform vec3 u_radii;\n\
|
|
2
|
+
export default "uniform vec3 u_radii;\n\
|
|
9
3
|
uniform vec3 u_oneOverEllipsoidRadiiSquared;\n\
|
|
10
4
|
\n\
|
|
11
|
-
|
|
5
|
+
in vec3 v_positionEC;\n\
|
|
12
6
|
\n\
|
|
13
7
|
vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n\
|
|
14
8
|
{\n\
|
|
@@ -90,11 +84,10 @@ void main()\n\
|
|
|
90
84
|
// If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n\
|
|
91
85
|
vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\
|
|
92
86
|
\n\
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n\
|
|
88
|
+
out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n\
|
|
95
89
|
\n\
|
|
96
|
-
#
|
|
97
|
-
#ifdef GL_EXT_frag_depth\n\
|
|
90
|
+
#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))\n\
|
|
98
91
|
t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n\
|
|
99
92
|
vec3 positionEC = czm_pointAlongRay(ray, t);\n\
|
|
100
93
|
vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n\
|
|
@@ -106,8 +99,7 @@ void main()\n\
|
|
|
106
99
|
float n = czm_depthRange.near;\n\
|
|
107
100
|
float f = czm_depthRange.far;\n\
|
|
108
101
|
\n\
|
|
109
|
-
|
|
110
|
-
#endif\n\
|
|
102
|
+
gl_FragDepth = (z * (f - n) + f + n) * 0.5;\n\
|
|
111
103
|
#endif\n\
|
|
112
104
|
#endif\n\
|
|
113
105
|
}\n\
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
-
export default "
|
|
2
|
+
export default "in vec3 position;\n\
|
|
3
3
|
\n\
|
|
4
4
|
uniform vec3 u_radii;\n\
|
|
5
5
|
\n\
|
|
6
|
-
|
|
6
|
+
out vec3 v_positionEC;\n\
|
|
7
7
|
\n\
|
|
8
8
|
void main()\n\
|
|
9
9
|
{\n\
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
|
|
49
49
|
// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
|
|
50
50
|
// with
|
|
51
|
-
// #define FxaaTexTop(t, p)
|
|
52
|
-
// #define FxaaTexOff(t, p, o, r)
|
|
51
|
+
// #define FxaaTexTop(t, p) texture(t, p)
|
|
52
|
+
// #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
|
|
53
53
|
// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.
|
|
54
54
|
// * The following parameters to FxaaPixelShader are unused and can be removed:
|
|
55
55
|
// fxaaConsolePosPos
|
|
@@ -269,8 +269,8 @@
|
|
|
269
269
|
#define FxaaTex sampler2D
|
|
270
270
|
|
|
271
271
|
#define FxaaSat(x) clamp(x, 0.0, 1.0)
|
|
272
|
-
#define FxaaTexTop(t, p)
|
|
273
|
-
#define FxaaTexOff(t, p, o, r)
|
|
272
|
+
#define FxaaTexTop(t, p) texture(t, p)
|
|
273
|
+
#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
|
|
274
274
|
|
|
275
275
|
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
|
|
276
276
|
|
|
@@ -77,8 +77,8 @@ export default "/**\n\
|
|
|
77
77
|
// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)\n\
|
|
78
78
|
// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)\n\
|
|
79
79
|
// with\n\
|
|
80
|
-
// #define FxaaTexTop(t, p)
|
|
81
|
-
// #define FxaaTexOff(t, p, o, r)
|
|
80
|
+
// #define FxaaTexTop(t, p) texture(t, p)\n\
|
|
81
|
+
// #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))\n\
|
|
82
82
|
// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.\n\
|
|
83
83
|
// * The following parameters to FxaaPixelShader are unused and can be removed:\n\
|
|
84
84
|
// fxaaConsolePosPos\n\
|
|
@@ -298,8 +298,8 @@ export default "/**\n\
|
|
|
298
298
|
#define FxaaTex sampler2D\n\
|
|
299
299
|
\n\
|
|
300
300
|
#define FxaaSat(x) clamp(x, 0.0, 1.0)\n\
|
|
301
|
-
#define FxaaTexTop(t, p)
|
|
302
|
-
#define FxaaTexOff(t, p, o, r)
|
|
301
|
+
#define FxaaTexTop(t, p) texture(t, p)\n\
|
|
302
|
+
#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))\n\
|
|
303
303
|
\n\
|
|
304
304
|
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\n\
|
|
305
305
|
\n\
|
|
@@ -105,26 +105,26 @@ uniform float u_lambertDiffuseMultiplier;
|
|
|
105
105
|
uniform float u_vertexShadowDarkness;
|
|
106
106
|
#endif
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
in vec3 v_positionMC;
|
|
109
|
+
in vec3 v_positionEC;
|
|
110
|
+
in vec3 v_textureCoordinates;
|
|
111
|
+
in vec3 v_normalMC;
|
|
112
|
+
in vec3 v_normalEC;
|
|
113
113
|
|
|
114
114
|
#ifdef APPLY_MATERIAL
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
in float v_height;
|
|
116
|
+
in float v_slope;
|
|
117
|
+
in float v_aspect;
|
|
118
118
|
#endif
|
|
119
119
|
|
|
120
120
|
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
|
|
121
|
-
|
|
121
|
+
in float v_distance;
|
|
122
122
|
#endif
|
|
123
123
|
|
|
124
124
|
#if defined(GROUND_ATMOSPHERE) || defined(FOG)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
in vec3 v_atmosphereRayleighColor;
|
|
126
|
+
in vec3 v_atmosphereMieColor;
|
|
127
|
+
in float v_atmosphereOpacity;
|
|
128
128
|
#endif
|
|
129
129
|
|
|
130
130
|
#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
|
|
@@ -195,7 +195,7 @@ vec4 sampleAndBlend(
|
|
|
195
195
|
vec2 translation = textureCoordinateTranslationAndScale.xy;
|
|
196
196
|
vec2 scale = textureCoordinateTranslationAndScale.zw;
|
|
197
197
|
vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
|
|
198
|
-
vec4 value =
|
|
198
|
+
vec4 value = texture(textureToSample, textureCoordinates);
|
|
199
199
|
vec3 color = value.rgb;
|
|
200
200
|
float alpha = value.a;
|
|
201
201
|
|
|
@@ -376,7 +376,7 @@ void main()
|
|
|
376
376
|
vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
|
|
377
377
|
waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;
|
|
378
378
|
|
|
379
|
-
float mask =
|
|
379
|
+
float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;
|
|
380
380
|
|
|
381
381
|
if (mask > 0.0)
|
|
382
382
|
{
|
|
@@ -545,7 +545,7 @@ void main()
|
|
|
545
545
|
}
|
|
546
546
|
#endif
|
|
547
547
|
|
|
548
|
-
|
|
548
|
+
out_FragColor = finalColor;
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
|
|
@@ -106,26 +106,26 @@ uniform float u_lambertDiffuseMultiplier;\n\
|
|
|
106
106
|
uniform float u_vertexShadowDarkness;\n\
|
|
107
107
|
#endif\n\
|
|
108
108
|
\n\
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
in vec3 v_positionMC;\n\
|
|
110
|
+
in vec3 v_positionEC;\n\
|
|
111
|
+
in vec3 v_textureCoordinates;\n\
|
|
112
|
+
in vec3 v_normalMC;\n\
|
|
113
|
+
in vec3 v_normalEC;\n\
|
|
114
114
|
\n\
|
|
115
115
|
#ifdef APPLY_MATERIAL\n\
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
in float v_height;\n\
|
|
117
|
+
in float v_slope;\n\
|
|
118
|
+
in float v_aspect;\n\
|
|
119
119
|
#endif\n\
|
|
120
120
|
\n\
|
|
121
121
|
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\n\
|
|
122
|
-
|
|
122
|
+
in float v_distance;\n\
|
|
123
123
|
#endif\n\
|
|
124
124
|
\n\
|
|
125
125
|
#if defined(GROUND_ATMOSPHERE) || defined(FOG)\n\
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
in vec3 v_atmosphereRayleighColor;\n\
|
|
127
|
+
in vec3 v_atmosphereMieColor;\n\
|
|
128
|
+
in float v_atmosphereOpacity;\n\
|
|
129
129
|
#endif\n\
|
|
130
130
|
\n\
|
|
131
131
|
#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\n\
|
|
@@ -196,7 +196,7 @@ vec4 sampleAndBlend(\n\
|
|
|
196
196
|
vec2 translation = textureCoordinateTranslationAndScale.xy;\n\
|
|
197
197
|
vec2 scale = textureCoordinateTranslationAndScale.zw;\n\
|
|
198
198
|
vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n\
|
|
199
|
-
vec4 value =
|
|
199
|
+
vec4 value = texture(textureToSample, textureCoordinates);\n\
|
|
200
200
|
vec3 color = value.rgb;\n\
|
|
201
201
|
float alpha = value.a;\n\
|
|
202
202
|
\n\
|
|
@@ -377,7 +377,7 @@ void main()\n\
|
|
|
377
377
|
vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n\
|
|
378
378
|
waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\
|
|
379
379
|
\n\
|
|
380
|
-
float mask =
|
|
380
|
+
float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;\n\
|
|
381
381
|
\n\
|
|
382
382
|
if (mask > 0.0)\n\
|
|
383
383
|
{\n\
|
|
@@ -546,7 +546,7 @@ void main()\n\
|
|
|
546
546
|
}\n\
|
|
547
547
|
#endif\n\
|
|
548
548
|
\n\
|
|
549
|
-
|
|
549
|
+
out_FragColor = finalColor;\n\
|
|
550
550
|
}\n\
|
|
551
551
|
\n\
|
|
552
552
|
\n\
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#ifdef QUANTIZATION_BITS12
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
in vec4 compressed0;
|
|
3
|
+
in float compressed1;
|
|
4
4
|
#else
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
in vec4 position3DAndHeight;
|
|
6
|
+
in vec4 textureCoordAndEncodedNormals;
|
|
7
7
|
#endif
|
|
8
8
|
|
|
9
9
|
#ifdef GEODETIC_SURFACE_NORMALS
|
|
10
|
-
|
|
10
|
+
in vec3 geodeticSurfaceNormal;
|
|
11
11
|
#endif
|
|
12
12
|
|
|
13
13
|
#ifdef EXAGGERATION
|
|
@@ -23,27 +23,27 @@ uniform vec4 u_tileRectangle;
|
|
|
23
23
|
uniform vec2 u_southAndNorthLatitude;
|
|
24
24
|
uniform vec2 u_southMercatorYAndOneOverHeight;
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
out vec3 v_positionMC;
|
|
27
|
+
out vec3 v_positionEC;
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
out vec3 v_textureCoordinates;
|
|
30
|
+
out vec3 v_normalMC;
|
|
31
|
+
out vec3 v_normalEC;
|
|
32
32
|
|
|
33
33
|
#ifdef APPLY_MATERIAL
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
out float v_slope;
|
|
35
|
+
out float v_aspect;
|
|
36
|
+
out float v_height;
|
|
37
37
|
#endif
|
|
38
38
|
|
|
39
39
|
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
|
|
40
|
-
|
|
40
|
+
out float v_distance;
|
|
41
41
|
#endif
|
|
42
42
|
|
|
43
43
|
#if defined(FOG) || defined(GROUND_ATMOSPHERE)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
out vec3 v_atmosphereRayleighColor;
|
|
45
|
+
out vec3 v_atmosphereMieColor;
|
|
46
|
+
out float v_atmosphereOpacity;
|
|
47
47
|
#endif
|
|
48
48
|
|
|
49
49
|
// These functions are generated at runtime.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
//This file is automatically rebuilt by the Cesium build process.
|
|
2
2
|
export default "#ifdef QUANTIZATION_BITS12\n\
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
in vec4 compressed0;\n\
|
|
4
|
+
in float compressed1;\n\
|
|
5
5
|
#else\n\
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
in vec4 position3DAndHeight;\n\
|
|
7
|
+
in vec4 textureCoordAndEncodedNormals;\n\
|
|
8
8
|
#endif\n\
|
|
9
9
|
\n\
|
|
10
10
|
#ifdef GEODETIC_SURFACE_NORMALS\n\
|
|
11
|
-
|
|
11
|
+
in vec3 geodeticSurfaceNormal;\n\
|
|
12
12
|
#endif\n\
|
|
13
13
|
\n\
|
|
14
14
|
#ifdef EXAGGERATION\n\
|
|
@@ -24,27 +24,27 @@ uniform vec4 u_tileRectangle;\n\
|
|
|
24
24
|
uniform vec2 u_southAndNorthLatitude;\n\
|
|
25
25
|
uniform vec2 u_southMercatorYAndOneOverHeight;\n\
|
|
26
26
|
\n\
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
out vec3 v_positionMC;\n\
|
|
28
|
+
out vec3 v_positionEC;\n\
|
|
29
29
|
\n\
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
out vec3 v_textureCoordinates;\n\
|
|
31
|
+
out vec3 v_normalMC;\n\
|
|
32
|
+
out vec3 v_normalEC;\n\
|
|
33
33
|
\n\
|
|
34
34
|
#ifdef APPLY_MATERIAL\n\
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
out float v_slope;\n\
|
|
36
|
+
out float v_aspect;\n\
|
|
37
|
+
out float v_height;\n\
|
|
38
38
|
#endif\n\
|
|
39
39
|
\n\
|
|
40
40
|
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\n\
|
|
41
|
-
|
|
41
|
+
out float v_distance;\n\
|
|
42
42
|
#endif\n\
|
|
43
43
|
\n\
|
|
44
44
|
#if defined(FOG) || defined(GROUND_ATMOSPHERE)\n\
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
out vec3 v_atmosphereRayleighColor;\n\
|
|
46
|
+
out vec3 v_atmosphereMieColor;\n\
|
|
47
|
+
out float v_atmosphereOpacity;\n\
|
|
48
48
|
#endif\n\
|
|
49
49
|
\n\
|
|
50
50
|
// These functions are generated at runtime.\n\
|
|
@@ -3,7 +3,7 @@ uniform sampler2D image;
|
|
|
3
3
|
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
4
4
|
{
|
|
5
5
|
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
6
|
-
vec4 rampColor =
|
|
6
|
+
vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
|
|
7
7
|
rampColor = czm_gammaCorrect(rampColor);
|
|
8
8
|
material.diffuse = rampColor.rgb;
|
|
9
9
|
material.alpha = rampColor.a;
|
|
@@ -4,7 +4,7 @@ export default "uniform sampler2D image;\n\
|
|
|
4
4
|
czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
5
5
|
{\n\
|
|
6
6
|
czm_material material = czm_getDefaultMaterial(materialInput);\n\
|
|
7
|
-
vec4 rampColor =
|
|
7
|
+
vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\n\
|
|
8
8
|
rampColor = czm_gammaCorrect(rampColor);\n\
|
|
9
9
|
material.diffuse = rampColor.rgb;\n\
|
|
10
10
|
material.alpha = rampColor.a;\n\
|
|
@@ -9,15 +9,15 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
9
9
|
vec2 st = materialInput.st;
|
|
10
10
|
|
|
11
11
|
vec2 centerPixel = fract(repeat * st);
|
|
12
|
-
float centerBump =
|
|
12
|
+
float centerBump = texture(image, centerPixel).channel;
|
|
13
13
|
|
|
14
14
|
float imageWidth = float(imageDimensions.x);
|
|
15
15
|
vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
|
|
16
|
-
float rightBump =
|
|
16
|
+
float rightBump = texture(image, rightPixel).channel;
|
|
17
17
|
|
|
18
18
|
float imageHeight = float(imageDimensions.y);
|
|
19
19
|
vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
|
|
20
|
-
float topBump =
|
|
20
|
+
float topBump = texture(image, leftPixel).channel;
|
|
21
21
|
|
|
22
22
|
vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
|
|
23
23
|
vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
|
|
@@ -10,15 +10,15 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
|
10
10
|
vec2 st = materialInput.st;\n\
|
|
11
11
|
\n\
|
|
12
12
|
vec2 centerPixel = fract(repeat * st);\n\
|
|
13
|
-
float centerBump =
|
|
13
|
+
float centerBump = texture(image, centerPixel).channel;\n\
|
|
14
14
|
\n\
|
|
15
15
|
float imageWidth = float(imageDimensions.x);\n\
|
|
16
16
|
vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\n\
|
|
17
|
-
float rightBump =
|
|
17
|
+
float rightBump = texture(image, rightPixel).channel;\n\
|
|
18
18
|
\n\
|
|
19
19
|
float imageHeight = float(imageDimensions.y);\n\
|
|
20
20
|
vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\n\
|
|
21
|
-
float topBump =
|
|
21
|
+
float topBump = texture(image, leftPixel).channel;\n\
|
|
22
22
|
\n\
|
|
23
23
|
vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\n\
|
|
24
24
|
vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n\
|
|
@@ -7,9 +7,9 @@ float getHeight(int idx, float invTexSize)
|
|
|
7
7
|
{
|
|
8
8
|
vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
|
|
9
9
|
#ifdef OES_texture_float
|
|
10
|
-
return
|
|
10
|
+
return texture(heights, uv).x;
|
|
11
11
|
#else
|
|
12
|
-
return czm_unpackFloat(
|
|
12
|
+
return czm_unpackFloat(texture(heights, uv));
|
|
13
13
|
#endif
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -58,7 +58,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
58
58
|
|
|
59
59
|
float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
|
|
60
60
|
vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
|
|
61
|
-
vec4 color =
|
|
61
|
+
vec4 color = texture(colors, colorUv);
|
|
62
62
|
|
|
63
63
|
// undo preumultiplied alpha
|
|
64
64
|
if (color.a > 0.0)
|
|
@@ -8,9 +8,9 @@ float getHeight(int idx, float invTexSize)\n\
|
|
|
8
8
|
{\n\
|
|
9
9
|
vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);\n\
|
|
10
10
|
#ifdef OES_texture_float\n\
|
|
11
|
-
return
|
|
11
|
+
return texture(heights, uv).x;\n\
|
|
12
12
|
#else\n\
|
|
13
|
-
return czm_unpackFloat(
|
|
13
|
+
return czm_unpackFloat(texture(heights, uv));\n\
|
|
14
14
|
#endif\n\
|
|
15
15
|
}\n\
|
|
16
16
|
\n\
|
|
@@ -59,7 +59,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
|
59
59
|
\n\
|
|
60
60
|
float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);\n\
|
|
61
61
|
vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);\n\
|
|
62
|
-
vec4 color =
|
|
62
|
+
vec4 color = texture(colors, colorUv);\n\
|
|
63
63
|
\n\
|
|
64
64
|
// undo preumultiplied alpha\n\
|
|
65
65
|
if (color.a > 0.0) \n\
|
|
@@ -12,12 +12,13 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
12
12
|
|
|
13
13
|
float distanceToContour = mod(materialInput.height, spacing);
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
|
|
16
16
|
float dxc = abs(dFdx(materialInput.height));
|
|
17
17
|
float dyc = abs(dFdy(materialInput.height));
|
|
18
18
|
float dF = max(dxc, dyc) * czm_pixelRatio * width;
|
|
19
19
|
float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
|
|
20
20
|
#else
|
|
21
|
+
// If no derivatives available (IE 10?), use pixel ratio
|
|
21
22
|
float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
|
|
22
23
|
#endif
|
|
23
24
|
|
|
@@ -13,12 +13,13 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
|
13
13
|
\n\
|
|
14
14
|
float distanceToContour = mod(materialInput.height, spacing);\n\
|
|
15
15
|
\n\
|
|
16
|
-
#
|
|
16
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n\
|
|
17
17
|
float dxc = abs(dFdx(materialInput.height));\n\
|
|
18
18
|
float dyc = abs(dFdy(materialInput.height));\n\
|
|
19
19
|
float dF = max(dxc, dyc) * czm_pixelRatio * width;\n\
|
|
20
20
|
float alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n\
|
|
21
21
|
#else\n\
|
|
22
|
+
// If no derivatives available (IE 10?), use pixel ratio\n\
|
|
22
23
|
float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n\
|
|
23
24
|
#endif\n\
|
|
24
25
|
\n\
|
|
@@ -6,7 +6,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
6
6
|
{
|
|
7
7
|
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
8
8
|
float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
|
|
9
|
-
vec4 rampColor =
|
|
9
|
+
vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
|
|
10
10
|
rampColor = czm_gammaCorrect(rampColor);
|
|
11
11
|
material.diffuse = rampColor.rgb;
|
|
12
12
|
material.alpha = rampColor.a;
|
|
@@ -7,7 +7,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
|
7
7
|
{\n\
|
|
8
8
|
czm_material material = czm_getDefaultMaterial(materialInput);\n\
|
|
9
9
|
float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\n\
|
|
10
|
-
vec4 rampColor =
|
|
10
|
+
vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));\n\
|
|
11
11
|
rampColor = czm_gammaCorrect(rampColor);\n\
|
|
12
12
|
material.diffuse = rampColor.rgb;\n\
|
|
13
13
|
material.alpha = rampColor.a;\n\
|
|
@@ -20,8 +20,9 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
20
20
|
scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
|
|
21
21
|
|
|
22
22
|
float value;
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
// Fuzz Factor - Controls blurriness of lines
|
|
25
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
|
|
25
26
|
const float fuzz = 1.2;
|
|
26
27
|
vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
|
|
27
28
|
|
|
@@ -33,7 +34,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
33
34
|
smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
|
|
34
35
|
smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
|
|
35
36
|
#else
|
|
36
|
-
//
|
|
37
|
+
// If no derivatives available (IE 10?), revert to view-dependent fuzz
|
|
37
38
|
const float fuzz = 0.05;
|
|
38
39
|
|
|
39
40
|
vec2 range = 0.5 - (lineThickness * 0.05);
|
|
@@ -21,8 +21,9 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
|
21
21
|
scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\
|
|
22
22
|
\n\
|
|
23
23
|
float value;\n\
|
|
24
|
-
|
|
24
|
+
\n\
|
|
25
25
|
// Fuzz Factor - Controls blurriness of lines\n\
|
|
26
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n\
|
|
26
27
|
const float fuzz = 1.2;\n\
|
|
27
28
|
vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\n\
|
|
28
29
|
\n\
|
|
@@ -34,7 +35,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\n\
|
|
|
34
35
|
smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n\
|
|
35
36
|
smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n\
|
|
36
37
|
#else\n\
|
|
37
|
-
//
|
|
38
|
+
// If no derivatives available (IE 10?), revert to view-dependent fuzz\n\
|
|
38
39
|
const float fuzz = 0.05;\n\
|
|
39
40
|
\n\
|
|
40
41
|
vec2 range = 0.5 - (lineThickness * 0.05);\n\
|