@arcgis/core 4.33.0-next.20250202 → 4.33.0-next.20250204
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/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d3a8aabdbfb59dd433e3.js → 01c3507d78398baaf61b.js} +1 -1
- package/assets/esri/core/workers/chunks/{c74441fbe0f63633796f.js → 04306c2760c1f5b19966.js} +1 -1
- package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js +2 -0
- package/assets/esri/core/workers/chunks/{bf9bc52a3c559108c19a.js.LICENSE.txt → 1a2e1a414e651e988435.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js +2 -0
- package/assets/esri/core/workers/chunks/{6e8905f20101c1f4509d.js.LICENSE.txt → 354531dc2f0dea2ad96f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{448ee44c7f594e5b2551.js → 3ce826ebf0692363309d.js} +1 -1
- package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +1 -0
- package/assets/esri/core/workers/chunks/{e9f0402fa3ac5a249807.js → 5196c43dbce48d1b81ae.js} +1 -1
- package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +1 -0
- package/assets/esri/core/workers/chunks/{3ec51b75d1a86dad6cb1.js → 60cd8f4bba3e682ba57e.js} +1 -1
- package/assets/esri/core/workers/chunks/61243217aed5de012e93.js +1 -0
- package/assets/esri/core/workers/chunks/69d307758262e5d7a32e.js +1 -0
- package/assets/esri/core/workers/chunks/{e444ec05a8a1dfbd21a8.js → 6dee40b94f94ee7bc4e4.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js +2 -0
- package/assets/esri/core/workers/chunks/{25c8cc30faade043c8dc.js.LICENSE.txt → 77764ca90bdd13ee2167.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{f8367c21fa91435c7c53.js → 7a3e4cb5f64dac2cfe0e.js} +1 -1
- package/assets/esri/core/workers/chunks/7b11bf5799ecb3640b48.js +314 -0
- package/assets/esri/core/workers/chunks/{ba3c18d1efde46461231.js → 8438fba57e82e4cc7c11.js} +1 -1
- package/assets/esri/core/workers/chunks/{0ef5b0f8aa8a09acd6e0.js → 8e90c5fee4ad7c7275dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2fae056a81f12b56b04.js → 8edae4ca2b18a219a43e.js} +1 -1
- package/assets/esri/core/workers/chunks/918bdba41fa470cf77fd.js +1 -0
- package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +1 -0
- package/assets/esri/core/workers/chunks/{7810579a5a780933cdc9.js → ad3e692681b50bd1acc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{adfa126cea32298c28e9.js → b1269b51cef3e11c85e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{692b3d03346f030aa649.js → b1f5344e57ee679a7e81.js} +44 -44
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b8a519d5d24b2e728ff8.js +2 -0
- package/assets/esri/core/workers/chunks/{7d3a441d2eb18d709ef9.js.LICENSE.txt → b8a519d5d24b2e728ff8.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/b9ce0049e27a3e1ed9f9.js +1 -0
- package/assets/esri/core/workers/chunks/{79afe4674a0557eb26e4.js → bf26f58210755875748c.js} +1 -1
- package/assets/esri/core/workers/chunks/c032bcd25e2e7a57ad43.js +1 -0
- package/assets/esri/core/workers/chunks/{6e25742ceedea7fb1b97.js → c3f03ccabca691186aad.js} +1 -1
- package/assets/esri/core/workers/chunks/{5adeb979f178944b9ce5.js → c4c2b94e5cee7b824093.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e872e5e528dca7bee0c.js → cc75bbfd779f409943a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c5279fedf982a174706.js → d175953337fa655dc6b0.js} +1 -1
- package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +1 -0
- package/assets/esri/core/workers/chunks/{bc50585615f07d5ec1a9.js → e4f82b5b50996b1ae48e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2345344be4b0e487d3a6.js → f198f4ba7d3d52882d98.js} +1 -1
- package/assets/esri/core/workers/chunks/{881ddbdeb40336208e90.js → f29715459ecd46180829.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1678945cf6a58f76863.js → f48ef415b90edc7ccadd.js} +1 -1
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +129 -425
- package/assets/esri/themes/base/widgets/_Editor.scss +31 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +30 -30
- package/chunks/DefaultMaterial.glsl.js +19 -19
- package/chunks/HUDMaterial.glsl.js +34 -34
- package/chunks/MeasurementArrow.glsl.js +6 -6
- package/chunks/NativeLine.glsl.js +4 -4
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/RealisticTree.glsl.js +14 -14
- package/chunks/RibbonLine.glsl.js +32 -32
- package/chunks/Terrain.glsl.js +31 -31
- package/chunks/WaterSurface.glsl.js +15 -15
- package/copyright.txt +0 -29
- package/core/Collection.js +1 -1
- package/core/has.js +1 -1
- package/geometry/support/centroid.js +1 -1
- package/interfaces.d.ts +139 -13
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/package.json +4 -5
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/support/AttachmentsOrderByInfo.d.ts +4 -0
- package/popup/support/AttachmentsOrderByInfo.js +5 -0
- package/portal/schemas/definitions.js +1 -1
- package/rest/imageService/fetchRasterInfo.js +1 -1
- package/support/revision.js +1 -1
- package/support/timeUtils.d.ts +0 -1
- package/support/timeUtils.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/views/2d/engine/webgl/animations/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/gradientStrokeConstants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
- package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.d.ts +4 -0
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/webscene/spec-certification/index.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Directions/DirectionsSearchTool.js +5 -0
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions/DirectionsVisibleElements.js +5 -0
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/VisibleElements.js +1 -1
- package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
- package/widgets/Editor/components/PanelToolbar.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +5 -0
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/css.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/ItemList.js +1 -1
- package/assets/esri/core/workers/chunks/06d72622590dbd38c5de.js +0 -1
- package/assets/esri/core/workers/chunks/0a19e1aec6a5502e391a.js +0 -1
- package/assets/esri/core/workers/chunks/12964a4b16113cdc9c93.js +0 -1
- package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js +0 -2
- package/assets/esri/core/workers/chunks/326a3f50e585e492b673.js +0 -1
- package/assets/esri/core/workers/chunks/34d464dacee52739c98c.js +0 -1
- package/assets/esri/core/workers/chunks/4cab082b8432ddc05345.js +0 -1
- package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js +0 -2
- package/assets/esri/core/workers/chunks/6f796f2836f949ab7359.js +0 -1
- package/assets/esri/core/workers/chunks/7d3a441d2eb18d709ef9.js +0 -2
- package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +0 -2
- package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +0 -1
- package/assets/esri/core/workers/chunks/fb1a89f753057f889971.js +0 -314
- package/assets/esri/core/workers/chunks/ffa2b9d70830aed03a8f.js +0 -1
- package/assets/esri/themes/base/widgets/_SaveLayer.scss +0 -40
- package/assets/esri/widgets/support/t9n/SaveLayer.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ar.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_bg.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_bs.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ca.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_cs.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_da.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_de.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_el.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_en.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_es.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_et.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_fi.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_fr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_he.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_hr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_hu.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_id.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_it.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ja.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ko.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_lt.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_lv.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_nl.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_no.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_pl.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_pt-BR.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_pt-PT.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ro.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_ru.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sk.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sl.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_sv.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_th.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_tr.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_uk.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_vi.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_zh-CN.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_zh-HK.json +0 -1
- package/assets/esri/widgets/support/t9n/SaveLayer_zh-TW.json +0 -1
- package/widgets/Directions/components/SaveLayer.js +0 -5
- package/widgets/Directions/css.js +0 -5
- /package/{views/3d/webgl-engine/core/shaderLibrary/util → webscene/support}/AlphaCutoff.js +0 -0
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as m}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as
|
|
5
|
+
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as m}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as p,addMainLightIntensity as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as x,PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as L,ReadShadowMapDraw as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as M}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as A,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as $,If as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as I}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as T}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as _}from"../webscene/support/AlphaCutoff.js";function R(R){const z=new B,{vertex:k,fragment:G,varyings:U}=z,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q}=R,X=J===x.Normal||J===x.Schematic;if(A(k,R),z.include(s),U.add("vpos","vec3"),z.include(O,R),z.include(l,R),z.include(g,R),z.include(j,R),i(W)&&(S(z.vertex,R),z.include(t,R),z.include(a,R),H&&z.include(r),q&&z.attributes.add(I.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3"),z.include(d,R),z.include(e,R),z.include(n,R),z.include(c,R),k.uniforms.add(new D("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add($`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
vcolorExt = externalColor;
|
|
8
|
-
${
|
|
8
|
+
${N(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
9
9
|
vcolorExt *= vvColor();
|
|
10
10
|
vcolorExt *= getSymbolColor();
|
|
11
11
|
forwardColorMixMode();
|
|
12
12
|
|
|
13
|
-
if (vcolorExt.a < ${
|
|
13
|
+
if (vcolorExt.a < ${$.float(_)}) {
|
|
14
14
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
15
15
|
} else {
|
|
16
16
|
vpos = getVertexInLocalOriginSpace();
|
|
@@ -19,15 +19,15 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
19
19
|
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
20
20
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
21
21
|
gl_Position = transformPosition(proj, view, vpos);
|
|
22
|
-
${
|
|
22
|
+
${N(H,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
23
23
|
}
|
|
24
24
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
25
25
|
forwardLinearDepth();
|
|
26
|
-
forwardTextureCoordinates();`)),i(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:i}=R;z.include(b,R),z.include(v,R),z.include(
|
|
26
|
+
forwardTextureCoordinates();`)),i(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:i}=R;z.include(b,R),z.include(v,R),z.include(P,R),z.include(R.instancedDoublePrecision?L:C,R),z.fragment.include(o,R),z.include(T,R),S(z.fragment,R),p(G),w(G),f(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.uniforms.get("view"),new E("ambient",(e=>e.ambient)),new E("diffuse",(e=>e.diffuse)),new F("opacity",(e=>e.opacity)),new F("layerOpacity",(e=>e.layerOpacity))),e&&G.uniforms.add(new V("tex",(e=>e.texture))),z.include(y,R),z.include(h,R),G.include(M),u(G),G.main.add($`
|
|
27
27
|
discardBySlice(vpos);
|
|
28
28
|
discardByTerrainDepth();
|
|
29
29
|
vec4 texColor = ${e?`texture(tex, ${r?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
30
|
-
${
|
|
30
|
+
${N(e,`${N(R.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
31
31
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
32
32
|
applyPBRFactors();
|
|
33
33
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -37,11 +37,11 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
37
37
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
38
38
|
float shadow = ${i?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":Q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
|
|
39
39
|
vec3 matColor = max(ambient, diffuse);
|
|
40
|
-
${R.hasVertexColors
|
|
41
|
-
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode))
|
|
40
|
+
${R.hasVertexColors?$`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
41
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:$`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
42
42
|
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
|
|
43
|
-
${
|
|
44
|
-
${
|
|
43
|
+
${N(K,"albedo = mix(albedo, vec3(1), 0.9);")}
|
|
44
|
+
${$`vec3 shadingNormal = normalize(vNormalWorld);
|
|
45
45
|
albedo *= 1.2;
|
|
46
46
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
47
47
|
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
@@ -49,10 +49,10 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
49
49
|
float treeRadialFalloff = vColor.r;
|
|
50
50
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
51
51
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
52
|
-
${
|
|
53
|
-
${X
|
|
54
|
-
${
|
|
52
|
+
${N(X,`vec3 normalGround = ${Q?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
|
|
53
|
+
${X?$`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
54
|
+
${N(K,$`mrr = vec3(0.0, 1.0, 0.04);`)}
|
|
55
55
|
vec4 emission = ${K?"vec4(0.0)":"getEmissions()"};
|
|
56
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance)
|
|
56
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:$`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
57
57
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
58
58
|
outputColorHighlightOID(finalColor, vpos);`)}return z.include(m,R),z}const z=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));export{z as R,R as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as r,computePixelSize as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{
|
|
5
|
+
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as r,computePixelSize as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as p,addPixelRatio as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{VertexAttribute as D}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{LineMarkerSpace as x}from"../views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js";import{outputColorHighlightOID as L}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{CapType as w}from"../views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as y}from"../webscene/support/AlphaCutoff.js";const j=1;function C(C){const F=new b,{attributes:P,varyings:R,vertex:z,fragment:A}=F,{applyMarkerOffset:T,draped:V,output:O,capType:W,stippleEnabled:E,falloffEnabled:I,roundJoins:N,wireframe:M,innerColorEnabled:_}=C;F.include(s),F.include(n,C),F.include(r,C),F.include(t,C),F.include(l,C);const k=T&&!V;k&&(z.uniforms.add(new h("markerScale",(e=>e.markerScale))),F.include(a,{space:x.World})),p(z,C),z.uniforms.add(new u("inverseProjectionMatrix",(e=>e.camera.inverseProjectionMatrix)),new m("nearFar",(e=>e.camera.nearFar)),new h("miterLimit",(e=>"miter"!==e.join?0:e.miterLimit)),new v("viewport",(e=>e.camera.fullViewport))),z.constants.add("LARGE_HALF_FLOAT","float",65500),P.add(D.POSITION,"vec3"),P.add(D.PREVPOSITION,"vec3"),P.add(D.NEXTPOSITION,"vec3"),P.add(D.SUBDIVISIONFACTOR,"float"),P.add(D.UV0,"vec2"),R.add("vColor","vec4"),R.add("vpos","vec3"),R.add("vLineDistance","float"),R.add("vLineWidth","float");const B=E;B&&R.add("vLineSizeInv","float");const U=W===w.ROUND,$=E&&U,H=I||$;H&&R.add("vLineDistanceNorm","float"),U&&(R.add("vSegmentSDF","float"),R.add("vReverseSegmentSDF","float")),z.code.add(S`vec2 perpendicular(vec2 v) {
|
|
6
6
|
return vec2(v.y, -v.x);
|
|
7
7
|
}
|
|
8
8
|
float interp(float ncp, vec4 a, vec4 b) {
|
|
@@ -13,11 +13,11 @@ float s = sin(a);
|
|
|
13
13
|
float c = cos(a);
|
|
14
14
|
mat2 m = mat2(c, -s, s, c);
|
|
15
15
|
return m * v;
|
|
16
|
-
}`),z.code.add(
|
|
16
|
+
}`),z.code.add(S`vec4 projectAndScale(vec4 pos) {
|
|
17
17
|
vec4 posNdc = proj * pos;
|
|
18
18
|
posNdc.xy *= viewport.zw / posNdc.w;
|
|
19
19
|
return posNdc;
|
|
20
|
-
}`),z.code.add(
|
|
20
|
+
}`),z.code.add(S`void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {
|
|
21
21
|
float vnp = nearFar[0] * 0.99;
|
|
22
22
|
if(pos.z > -nearFar[0]) {
|
|
23
23
|
if (!isStartVertex) {
|
|
@@ -47,7 +47,7 @@ forwardViewPosDepth(pos.xyz);
|
|
|
47
47
|
pos = projectAndScale(pos);
|
|
48
48
|
next = projectAndScale(next);
|
|
49
49
|
prev = projectAndScale(prev);
|
|
50
|
-
}`),
|
|
50
|
+
}`),c(z),z.constants.add("aaWidth","float",E?0:1).main.add(S`
|
|
51
51
|
// unpack values from uv0.y
|
|
52
52
|
bool isStartVertex = abs(abs(uv0.y)-3.0) == 1.0;
|
|
53
53
|
|
|
@@ -72,25 +72,25 @@ prev = projectAndScale(prev);
|
|
|
72
72
|
|
|
73
73
|
float lineWidth = lineSize * pixelRatio;
|
|
74
74
|
vLineWidth = lineWidth;
|
|
75
|
-
${B?
|
|
75
|
+
${B?S`vLineSizeInv = 1.0 / lineSize;`:""}
|
|
76
76
|
|
|
77
77
|
vec4 pos = view * vec4(position, 1.0);
|
|
78
78
|
vec4 prev = view * vec4(prevPosition, 1.0);
|
|
79
79
|
vec4 next = view * vec4(nextPosition, 1.0);
|
|
80
|
-
`),k&&z.main.add(
|
|
80
|
+
`),k&&z.main.add(S`vec4 other = isStartVertex ? next : prev;
|
|
81
81
|
bool markersHidden = areWorldMarkersHidden(pos, other);
|
|
82
82
|
if(!isJoin && !markersHidden) {
|
|
83
83
|
pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos) * 0.5;
|
|
84
|
-
}`),z.main.add(
|
|
84
|
+
}`),z.main.add(S`clipAndTransform(pos, prev, next, isStartVertex);
|
|
85
85
|
vec2 left = (pos.xy - prev.xy);
|
|
86
86
|
vec2 right = (next.xy - pos.xy);
|
|
87
87
|
float leftLen = length(left);
|
|
88
|
-
float rightLen = length(right);`);(E||U)&&z.main.add(
|
|
88
|
+
float rightLen = length(right);`);(E||U)&&z.main.add(S`
|
|
89
89
|
float isEndVertex = float(!isStartVertex);
|
|
90
90
|
vec2 segmentOrigin = mix(pos.xy, prev.xy, isEndVertex);
|
|
91
91
|
vec2 segment = mix(right, left, isEndVertex);
|
|
92
|
-
${U?
|
|
93
|
-
`),z.main.add(
|
|
92
|
+
${U?S`vec2 segmentEnd = mix(next.xy, pos.xy, isEndVertex);`:""}
|
|
93
|
+
`),z.main.add(S`left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);
|
|
94
94
|
right = (rightLen > 0.001) ? right/rightLen : vec2(0.0, 0.0);
|
|
95
95
|
vec2 capDisplacementDir = vec2(0, 0);
|
|
96
96
|
vec2 joinDisplacementDir = vec2(0, 0);
|
|
@@ -106,18 +106,18 @@ if (!isOutside) {
|
|
|
106
106
|
displacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),N?z.main.add(
|
|
109
|
+
if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),N?z.main.add(S`
|
|
110
110
|
vec2 startDir = leftLen < 0.001 ? right : left;
|
|
111
111
|
startDir = perpendicular(startDir);
|
|
112
112
|
|
|
113
113
|
vec2 endDir = rightLen < 0.001 ? left : right;
|
|
114
114
|
endDir = perpendicular(endDir);
|
|
115
115
|
|
|
116
|
-
float factor = ${E?
|
|
116
|
+
float factor = ${E?S`min(1.0, subdivisionFactor * ${S.float((j+2)/(j+1))})`:S`subdivisionFactor`};
|
|
117
117
|
|
|
118
118
|
float rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));
|
|
119
119
|
joinDisplacementDir = rotate(startDir, -sign(uv0.y) * factor * rotationAngle);
|
|
120
|
-
`):z.main.add(
|
|
120
|
+
`):z.main.add(S`if (leftLen < 0.001) {
|
|
121
121
|
joinDisplacementDir = right;
|
|
122
122
|
}
|
|
123
123
|
else if (rightLen < 0.001) {
|
|
@@ -126,7 +126,7 @@ joinDisplacementDir = left;
|
|
|
126
126
|
else {
|
|
127
127
|
joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? right : left;
|
|
128
128
|
}
|
|
129
|
-
joinDisplacementDir = perpendicular(joinDisplacementDir);`);const J=W!==
|
|
129
|
+
joinDisplacementDir = perpendicular(joinDisplacementDir);`);const J=W!==w.BUTT;return z.main.add(S`
|
|
130
130
|
displacementLen = lineWidth;
|
|
131
131
|
}
|
|
132
132
|
} else {
|
|
@@ -134,27 +134,27 @@ joinDisplacementDir = perpendicular(joinDisplacementDir);`);const J=W!==b.BUTT;r
|
|
|
134
134
|
joinDisplacementDir = isStartVertex ? right : left;
|
|
135
135
|
joinDisplacementDir = perpendicular(joinDisplacementDir);
|
|
136
136
|
|
|
137
|
-
${J?
|
|
137
|
+
${J?S`capDisplacementDir = isStartVertex ? -right : left;`:""}
|
|
138
138
|
}
|
|
139
|
-
`),z.main.add(
|
|
139
|
+
`),z.main.add(S`
|
|
140
140
|
// Displacement (in pixels) caused by join/or cap
|
|
141
141
|
vec2 dpos = joinDisplacementDir * sign(uv0.y) * displacementLen + capDisplacementDir * displacementLen;
|
|
142
142
|
float lineDistNorm = sign(uv0.y) * pos.w;
|
|
143
143
|
|
|
144
144
|
vLineDistance = lineWidth * lineDistNorm;
|
|
145
|
-
${H?
|
|
145
|
+
${H?S`vLineDistanceNorm = lineDistNorm;`:""}
|
|
146
146
|
|
|
147
147
|
pos.xy += dpos;
|
|
148
|
-
`),U&&z.main.add(
|
|
148
|
+
`),U&&z.main.add(S`vec2 segmentDir = normalize(segment);
|
|
149
149
|
vSegmentSDF = (isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin, segmentDir) * pos.w) ;
|
|
150
|
-
vReverseSegmentSDF = (isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir) * pos.w);`),E&&(V?z.uniforms.add(new
|
|
151
|
-
float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),z.main.add(
|
|
150
|
+
vReverseSegmentSDF = (isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir) * pos.w);`),E&&(V?z.uniforms.add(new g("worldToScreenRatio",(e=>1/e.screenToPCSRatio))):z.main.add(S`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
|
|
151
|
+
float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),z.main.add(S`float segmentLengthScreenDouble = length(segment);
|
|
152
152
|
float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
|
|
153
153
|
float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);
|
|
154
154
|
float segmentLengthRender = length(mix(nextPosition - position, position - prevPosition, isEndVertex));
|
|
155
|
-
vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),V?z.main.add(
|
|
156
|
-
float startPseudoScreen = uv0.x * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):z.main.add(
|
|
157
|
-
float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),z.uniforms.add(new
|
|
155
|
+
vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),V?z.main.add(S`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
|
|
156
|
+
float startPseudoScreen = uv0.x * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):z.main.add(S`float startPseudoScreen = mix(uv0.x, uv0.x - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
|
|
157
|
+
float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),z.uniforms.add(new h("stipplePatternPixelSize",(e=>o(e)))),z.main.add(S`float patternLength = lineSize * stipplePatternPixelSize;
|
|
158
158
|
vStippleDistanceLimits = computeStippleDistanceLimits(startPseudoScreen, segmentLengthPseudoScreen, segmentLengthScreen, patternLength);
|
|
159
159
|
vStippleDistance = mix(vStippleDistanceLimits.x, vStippleDistanceLimits.y, isEndVertex);
|
|
160
160
|
if (segmentLengthScreenDouble >= 0.001) {
|
|
@@ -168,7 +168,7 @@ vStippleDistanceLimits = isJoin ?
|
|
|
168
168
|
vStippleDistanceLimits :
|
|
169
169
|
isStartVertex ?
|
|
170
170
|
vec2(-1e34, vStippleDistanceLimits.y) :
|
|
171
|
-
vec2(vStippleDistanceLimits.x, 1e34);`)),z.main.add(
|
|
171
|
+
vec2(vStippleDistanceLimits.x, 1e34);`)),z.main.add(S`
|
|
172
172
|
// Convert back into NDC
|
|
173
173
|
pos.xy = (pos.xy / viewport.zw) * pos.w;
|
|
174
174
|
|
|
@@ -181,8 +181,8 @@ vec2(vStippleDistanceLimits.x, 1e34);`)),z.main.add(u`
|
|
|
181
181
|
vpos = (inverseProjectionMatrix * pos).xyz;
|
|
182
182
|
gl_Position = pos;
|
|
183
183
|
forwardObjectAndLayerIdColor();
|
|
184
|
-
}`),F.fragment.include(i,C),F.include(
|
|
185
|
-
discardByTerrainDepth();`),M?A.main.add(
|
|
184
|
+
}`),F.fragment.include(i,C),F.include(L,C),A.include(d),A.main.add(S`discardBySlice(vpos);
|
|
185
|
+
discardByTerrainDepth();`),M?A.main.add(S`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(U&&A.main.add(S`
|
|
186
186
|
float sdf = min(vSegmentSDF, vReverseSegmentSDF);
|
|
187
187
|
vec2 fragmentPosition = vec2(
|
|
188
188
|
min(sdf, 0.0),
|
|
@@ -193,10 +193,10 @@ discardByTerrainDepth();`),M?A.main.add(u`vec4 finalColor = vec4(1.0, 0.0, 1.0,
|
|
|
193
193
|
float fragmentCapSDF = (fragmentRadius - vLineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
|
|
194
194
|
float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
|
|
195
195
|
|
|
196
|
-
if (capCoverage < ${
|
|
196
|
+
if (capCoverage < ${S.float(y)}) {
|
|
197
197
|
discard;
|
|
198
198
|
}
|
|
199
|
-
`),$?A.main.add(
|
|
199
|
+
`),$?A.main.add(S`
|
|
200
200
|
vec2 stipplePosition = vec2(
|
|
201
201
|
min(getStippleSDF() * 2.0 - 1.0, 0.0),
|
|
202
202
|
vLineDistanceNorm * gl_FragCoord.w
|
|
@@ -204,11 +204,11 @@ discardByTerrainDepth();`),M?A.main.add(u`vec4 finalColor = vec4(1.0, 0.0, 1.0,
|
|
|
204
204
|
float stippleRadius = length(stipplePosition * vLineWidth);
|
|
205
205
|
float stippleCapSDF = (stippleRadius - vLineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
|
|
206
206
|
float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
|
|
207
|
-
float stippleAlpha = step(${
|
|
208
|
-
`):A.main.add(
|
|
207
|
+
float stippleAlpha = step(${S.float(y)}, stippleCoverage);
|
|
208
|
+
`):A.main.add(S`float stippleAlpha = getStippleAlpha();`),O!==e.ObjectAndLayerIdColor&&A.main.add(S`discardByStippleAlpha(stippleAlpha, ${S.float(y)});`),A.uniforms.add(new f("intrinsicColor",(e=>e.color))),A.main.add(S`vec4 color = intrinsicColor * vColor;`),_&&(A.uniforms.add(new f("innerColor",(e=>e.innerColor??e.color)),new h("innerWidth",((e,i)=>e.innerWidth*i.camera.pixelRatio))),A.main.add(S`float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;
|
|
209
209
|
float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
|
|
210
210
|
float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
|
|
211
|
-
color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`)),A.main.add(
|
|
211
|
+
color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`)),A.main.add(S`vec4 finalColor = blendStipple(color, stippleAlpha);`),I&&(A.uniforms.add(new h("falloff",(e=>e.falloff))),A.main.add(S`finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);`)),E||A.main.add(S`float featherStartDistance = max(vLineWidth - 2.0, 0.0);
|
|
212
212
|
float value = abs(vLineDistance) * gl_FragCoord.w;
|
|
213
213
|
float feather = (value - featherStartDistance) / (vLineWidth - featherStartDistance);
|
|
214
|
-
finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`)),A.main.add(
|
|
214
|
+
finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`)),A.main.add(S`outputColorHighlightOID(finalColor, vpos);`),F}const F=Object.freeze(Object.defineProperty({__proto__:null,build:C,ribbonlineNumRoundJoinSubdivisions:j},Symbol.toStringTag,{value:"Module"}));export{F as R,C as b,j as r};
|
package/chunks/Terrain.glsl.js
CHANGED
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,i as a}from"./vec32.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{OverlayContent as l}from"../views/3d/terrain/OverlayContent.js";import{TransparencyMode as t}from"../views/3d/terrain/TransparencyMode.js";import{addLinearDepth as n,addNearFar as s,ForwardLinearDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as v}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{TextureCoordinateAttribute as f}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as w}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as y,addAmbientBoostFactor as C,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as j,addMainLightIntensity as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayMode as z,OverlayTerrain as P}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as M,TerrainTexture as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{
|
|
5
|
+
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,i as a}from"./vec32.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{OverlayContent as l}from"../views/3d/terrain/OverlayContent.js";import{TransparencyMode as t}from"../views/3d/terrain/TransparencyMode.js";import{addLinearDepth as n,addNearFar as s,ForwardLinearDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as v}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{TextureCoordinateAttribute as f}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as w}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as y,addAmbientBoostFactor as C,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as j,addMainLightIntensity as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayMode as z,OverlayTerrain as P}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as M,TerrainTexture as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as N,addViewNormal as D,addCameraPosition as W}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as V,If as F}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as U}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as _}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as H}from"../webscene/support/AlphaCutoff.js";class k extends M{}function E(r){const i=new B,{vertex:M,fragment:k,varyings:E}=i,{output:G,pbrMode:R,overlayMode:J,tileBorders:K,spherical:Q,transparencyMode:X,screenSizePerspective:Y}=r;i.include(p),i.include(g,r),i.include(f,r);const Z=()=>{i.include(S,r),M.code.add(V`vec3 getNormal() {
|
|
6
6
|
float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
|
|
7
7
|
vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
|
|
8
8
|
normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
|
|
9
9
|
return normalize(n);
|
|
10
|
-
}`)};
|
|
10
|
+
}`)};N(M,r),i.include(v,r);const ee=X===t.InvisibleWithDraped||X===t.Invisible,re=J!==z.Disabled,oe=re&ⅇswitch(G){case d.ColorEmission:case d.Color:{i.include($,r),i.include(y,r),re&&(r.pbrMode=R===L.Simplified?L.TerrainWithWater:L.Water,i.include(P,r),r.pbrMode=R);const t=J===z.EnabledWithWater;t&&i.include(w,r),E.add("vnormal","vec3"),E.add("vpos","vec3"),E.add("vup","vec3"),Z(),Y&&D(M);const n=r.receiveShadows&&!r.renderOccluded;n&&i.include(c,r),Y&&(E.add("screenSizeDistanceToCamera","float"),E.add("screenSizeCosAngle","float")),M.main.add(V`
|
|
11
11
|
vpos = position;
|
|
12
12
|
vec3 positionWorld = position + localOrigin;
|
|
13
13
|
gl_Position = transformPosition(proj, view, vpos);
|
|
14
14
|
vnormal = getNormal();
|
|
15
15
|
vup = getLocalUp(position, localOrigin);
|
|
16
|
-
${
|
|
16
|
+
${F(t,V`forwardVertexTangent(vnormal);`)}
|
|
17
17
|
|
|
18
18
|
vec2 uv = getUV0();
|
|
19
19
|
forwardTextureCoordinatesWithTransform(uv);
|
|
20
|
-
${
|
|
21
|
-
${
|
|
22
|
-
${
|
|
20
|
+
${F(re,"setOverlayVTC(uv);")}
|
|
21
|
+
${F(K,"forwardTextureCoordinates();")}
|
|
22
|
+
${F(Y,V`vec3 viewPos = (view * vec4(vpos, 1.0)).xyz;
|
|
23
23
|
screenSizeDistanceToCamera = length(viewPos);
|
|
24
24
|
vec3 viewSpaceNormal = (viewNormal * vec4(normalize(positionWorld), 1.0)).xyz;
|
|
25
25
|
screenSizeCosAngle = abs(viewSpaceNormal.z);`)}
|
|
26
|
-
${
|
|
26
|
+
${F(n,"forwardLinearDepth();")}`),i.fragment.include(m,r),i.include(y,r),i.include(b,r),i.include(T,r),W(k,r),C(k),x(k),k.uniforms.add(M.uniforms.get("localOrigin"),new A("viewDirection",(({camera:e})=>o(q,a(q,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14]))))),t&&k.uniforms.add(new _("ovWaterTex",(e=>e.overlay?.getTexture(l.WaterNormal))),new U("view",(({origin:r},{camera:o})=>e(I,o.viewMatrix,r))));const s=.2;k.code.add(V`float lum(vec3 c) {
|
|
27
27
|
return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
|
|
28
|
-
}`),j(k),O(k),k.main.add(
|
|
28
|
+
}`),j(k),O(k),k.main.add(V`
|
|
29
29
|
vec3 normal = normalize(vnormal);
|
|
30
30
|
float vndl = dot(normal, mainLightDirection);
|
|
31
31
|
|
|
@@ -35,21 +35,21 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
|
|
|
35
35
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
36
36
|
vec4 tileColor = getTileColor();
|
|
37
37
|
|
|
38
|
-
${
|
|
38
|
+
${F(re,V`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
|
|
39
39
|
vec4 overlayColor = overlayOpacity * overlayColorOpaque;
|
|
40
|
-
${
|
|
40
|
+
${F(ee,`if (overlayColor.a < ${V.float(H)}) { discard; }`)}
|
|
41
41
|
vec4 groundColor = tileColor;
|
|
42
42
|
tileColor = tileColor * (1.0 - overlayColor.a) + overlayColor;`)}
|
|
43
43
|
|
|
44
44
|
// If combined alpha is 0 we can discard pixel. The performance impact by having a discard here
|
|
45
45
|
// is neglectable because terrain typically renders first into the framebuffer.
|
|
46
|
-
if(tileColor.a < ${
|
|
46
|
+
if(tileColor.a < ${V.float(H)}) {
|
|
47
47
|
discard;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
bool sliced = rejectBySlice(vpos);
|
|
51
51
|
if (sliced) {
|
|
52
|
-
tileColor *= ${
|
|
52
|
+
tileColor *= ${V.float(s)};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
vec3 albedo = tileColor.rgb;
|
|
@@ -58,8 +58,8 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
|
|
|
58
58
|
|
|
59
59
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
60
60
|
|
|
61
|
-
${R===L.Simplified||R===L.TerrainWithWater?
|
|
62
|
-
${
|
|
61
|
+
${R===L.Simplified||R===L.TerrainWithWater?V`fragColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:V`fragColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
|
|
62
|
+
${F(t,V`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
|
|
63
63
|
float waterNormalLength = length(overlayWaterMask);
|
|
64
64
|
if (waterNormalLength > 0.95) {
|
|
65
65
|
mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, vnormal);
|
|
@@ -67,11 +67,11 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
|
|
|
67
67
|
vec4 viewPosition = view*vec4(vpos, 1.0);
|
|
68
68
|
vec4 waterColorLinear = getOverlayWaterColor(overlayWaterMask, waterOverlayColor, -normalize(vpos - cameraPosition), shadow, vnormal, tbnMatrix, viewPosition.xyz, vpos + localOrigin);
|
|
69
69
|
vec4 waterColorNonLinear = delinearizeGamma(vec4(waterColorLinear.xyz, 1.0));
|
|
70
|
-
float opacity = sliced ? ${
|
|
70
|
+
float opacity = sliced ? ${V.float(s)} : 1.0;
|
|
71
71
|
// un-gamma the ground color to mix in linear space
|
|
72
72
|
fragColor = mix(groundColor, waterColorNonLinear, waterColorLinear.w) * opacity;
|
|
73
73
|
}`)}
|
|
74
|
-
${
|
|
74
|
+
${F(Y,V`float perspectiveScale = screenSizePerspectiveScaleFloat(1.0, screenSizeCosAngle, screenSizeDistanceToCamera, vec4(0.0));
|
|
75
75
|
if (perspectiveScale <= 0.25) {
|
|
76
76
|
fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), perspectiveScale * 4.0);
|
|
77
77
|
} else if (perspectiveScale <= 0.5) {
|
|
@@ -81,35 +81,35 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
|
|
|
81
81
|
} else {
|
|
82
82
|
fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), (perspectiveScale - 0.5) * 2.0);
|
|
83
83
|
}`)}
|
|
84
|
-
${
|
|
84
|
+
${F(r.visualizeNormals,Q?V`
|
|
85
85
|
vec3 localUp = normalize(vpos + localOrigin);
|
|
86
86
|
vec3 right = normalize(cross(vec3(0.0, 0.0, 1.0), localUp));
|
|
87
87
|
vec3 forward = normalize(cross(localUp, right));
|
|
88
88
|
mat3 tbn = mat3(right, forward, localUp);
|
|
89
89
|
vec3 tNormal = normalize(normal * tbn);
|
|
90
|
-
fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`:
|
|
90
|
+
fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`:V`
|
|
91
91
|
vec3 tNormal = normalize(normal);
|
|
92
92
|
fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`)}
|
|
93
|
-
${
|
|
93
|
+
${F(K,V`vec2 dVuv = fwidth(vuv0);
|
|
94
94
|
vec2 edgeFactors = smoothstep(vec2(0.0), 1.5 * dVuv, min(vuv0, 1.0 - vuv0));
|
|
95
95
|
float edgeFactor = 1.0 - min(edgeFactors.x, edgeFactors.y);
|
|
96
96
|
fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`)}
|
|
97
|
-
fragColor = applySlice(fragColor, vpos);`)}break;case d.Depth:oe&&i.include(P,r),M.main.add(
|
|
98
|
-
${
|
|
99
|
-
gl_Position = transformPosition(proj, view, position);`),k.main.add(`${
|
|
100
|
-
${
|
|
97
|
+
fragColor = applySlice(fragColor, vpos);`)}break;case d.Depth:oe&&i.include(P,r),M.main.add(V`
|
|
98
|
+
${F(oe,"setOverlayVTC(getUV0());")}
|
|
99
|
+
gl_Position = transformPosition(proj, view, position);`),k.main.add(`${F(oe,`if (getCombinedOverlayColor().a < ${V.float(H)}) discard;`)}`);break;case d.Shadow:case d.ShadowHighlight:case d.ShadowExcludeHighlight:case d.ViewshedShadow:i.include(h,r),n(i),s(i),M.main.add(V`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),k.main.add(V`outputDepth(linearDepth);`);break;case d.Normal:oe&&i.include(P,r),E.add("vnormal","vec3"),D(M),Z(),M.main.add(V`
|
|
100
|
+
${F(oe,"setOverlayVTC(getUV0());")}
|
|
101
101
|
gl_Position = transformPosition(proj, view, position);
|
|
102
|
-
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),k.main.add(
|
|
103
|
-
${
|
|
102
|
+
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),k.main.add(V`
|
|
103
|
+
${F(oe,`if (getCombinedOverlayColor().a < ${V.float(H)}) discard;`)}
|
|
104
104
|
vec3 normal = normalize(vnormal);
|
|
105
105
|
if (gl_FrontFacing == false) {
|
|
106
106
|
normal = -normal;
|
|
107
107
|
}
|
|
108
|
-
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case d.Highlight:re&&i.include(P,r),M.main.add(
|
|
109
|
-
${
|
|
110
|
-
gl_Position = transformPosition(proj, view, position);`),i.include(u,r),k.main.add(
|
|
111
|
-
${
|
|
108
|
+
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case d.Highlight:re&&i.include(P,r),M.main.add(V`
|
|
109
|
+
${F(re,"setOverlayVTC(getUV0());")}
|
|
110
|
+
gl_Position = transformPosition(proj, view, position);`),i.include(u,r),k.main.add(V`
|
|
111
|
+
${F(re,V`
|
|
112
112
|
vec2 overlayHighlightTexel = getAllOverlayHighlightValuesEncoded();
|
|
113
113
|
calculateOcclusionAndOutputHighlightOverlay(overlayHighlightTexel);`,"calculateOcclusionAndOutputHighlight();")}
|
|
114
|
-
`)}if(G===d.ObjectAndLayerIdColor)if(re)r.pbrMode=L.Disabled,i.include(P,r),r.pbrMode=R,M.main.add(
|
|
115
|
-
setOverlayVTC(getUV0());`),k.main.add(
|
|
114
|
+
`)}if(G===d.ObjectAndLayerIdColor)if(re)r.pbrMode=L.Disabled,i.include(P,r),r.pbrMode=R,M.main.add(V`gl_Position = transformPosition(proj, view, position);
|
|
115
|
+
setOverlayVTC(getUV0());`),k.main.add(V`fragColor = getOverlayColorTexel();`);else{const e=X===t.Opaque;M.main.add(V`${F(e,"gl_Position = transformPosition(proj, view, position);")}`),k.main.add(V`fragColor = vec4(0.0);`)}return i}const I=r(),q=i(),G=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:k,build:E},Symbol.toStringTag,{value:"Module"}));export{k as T,G as a,E as b};
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{isColorOrColorEmission as r,ShaderOutput as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as
|
|
6
|
-
if (waterColor.a < ${
|
|
5
|
+
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{isColorOrColorEmission as r,ShaderOutput as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{OutputHighlight as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientLighting as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{addMainLightDirection as l,addMainLightIntensity as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{Water as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js";import{WaterDistortion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ColorConversion as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addCameraPosition as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as j}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{VertexAttribute as L}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as C}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as P}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as x}from"../webscene/support/AlphaCutoff.js";function O(O){const S=new P,{vertex:D,fragment:N}=S,{output:_,draped:F,receiveShadows:M}=O;f(D,O),S.include(a,O),S.attributes.add(L.POSITION,"vec3"),S.attributes.add(L.UV0,"vec2");const z=new b("waterColor",(e=>e.color));if(r(_)&&F)return S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
|
|
6
|
+
if (waterColor.a < ${j.float(x)}) {
|
|
7
7
|
// Discard this vertex
|
|
8
8
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
vpos = position;
|
|
13
|
-
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(z),N.main.add(
|
|
14
|
-
if (waterColor.a < ${
|
|
13
|
+
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(z),N.main.add(j`fragColor = waterColor;`),S;switch(r(_)&&(S.include(g,O),S.include(e,O),S.varyings.add("vuv","vec2"),S.varyings.add("vpos","vec3"),S.varyings.add("vnormal","vec3"),S.varyings.add("vtbnMatrix","mat3"),D.uniforms.add(z),D.main.add(j`
|
|
14
|
+
if (waterColor.a < ${j.float(x)}) {
|
|
15
15
|
// Discard this vertex
|
|
16
16
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
17
17
|
return;
|
|
@@ -25,7 +25,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
25
25
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
26
26
|
|
|
27
27
|
gl_Position = transformPosition(proj, view, vpos);
|
|
28
|
-
forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(
|
|
28
|
+
forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(C,O),N.uniforms.add(z,new y("timeElapsed",(e=>e.timeElapsed)),D.uniforms.get("view"),D.uniforms.get("localOrigin")),h(N,O),N.include(u),l(N),d(N),N.main.add(j`
|
|
29
29
|
discardBySlice(vpos);
|
|
30
30
|
discardByTerrainDepth();
|
|
31
31
|
vec3 localUp = vnormal;
|
|
@@ -35,14 +35,14 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
35
35
|
// we rotate the normal according to the tangent-bitangent-normal-Matrix
|
|
36
36
|
vec3 n = normalize(vtbnMatrix * tangentNormalFoam.xyz);
|
|
37
37
|
vec3 v = -normalize(vpos - cameraPosition);
|
|
38
|
-
float shadow = ${M?
|
|
38
|
+
float shadow = ${M?j`1.0 - readShadowMap(vpos, linearDepth)`:"1.0"};
|
|
39
39
|
vec4 vPosView = view * vec4(vpos, 1.0);
|
|
40
40
|
vec4 final = vec4(getSeaColor(n, v, mainLightDirection, waterColor.rgb, mainLightIntensity, localUp, shadow, tangentNormalFoam.w, vPosView.xyz, vpos + localOrigin), waterColor.w);
|
|
41
41
|
|
|
42
42
|
// gamma correction
|
|
43
43
|
fragColor = delinearizeGamma(final);
|
|
44
|
-
outputColorHighlightOID(fragColor, vpos);`);break;case i.Normal:S.include(g,O),S.include(w,O),S.fragment.include(o,O),S.varyings.add("vpos","vec3"),S.varyings.add("vuv","vec2"),D.uniforms.add(z),D.main.add(
|
|
45
|
-
if (waterColor.a < ${
|
|
44
|
+
outputColorHighlightOID(fragColor, vpos);`);break;case i.Normal:S.include(g,O),S.include(w,O),S.fragment.include(o,O),S.varyings.add("vpos","vec3"),S.varyings.add("vuv","vec2"),D.uniforms.add(z),D.main.add(j`
|
|
45
|
+
if (waterColor.a < ${j.float(x)}) {
|
|
46
46
|
// Discard this vertex
|
|
47
47
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
48
48
|
return;
|
|
@@ -51,20 +51,20 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
51
51
|
vuv = uv0;
|
|
52
52
|
vpos = position;
|
|
53
53
|
|
|
54
|
-
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new
|
|
54
|
+
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new y("timeElapsed",(e=>e.timeElapsed))),N.main.add(j`discardBySlice(vpos);
|
|
55
55
|
vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
|
|
56
56
|
tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
|
|
57
|
-
fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case i.Highlight:S.include(
|
|
58
|
-
if (waterColor.a < ${
|
|
57
|
+
fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case i.Highlight:S.include(n,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
|
|
58
|
+
if (waterColor.a < ${j.float(x)}) {
|
|
59
59
|
// Discard this vertex
|
|
60
60
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
vpos = position;
|
|
65
|
-
gl_Position = transformPosition(proj, view, vpos);`),S.fragment.include(o,O),N.main.add(
|
|
66
|
-
calculateOcclusionAndOutputHighlight();`);break;case i.ObjectAndLayerIdColor:S.include(
|
|
67
|
-
if (waterColor.a < ${
|
|
65
|
+
gl_Position = transformPosition(proj, view, vpos);`),S.fragment.include(o,O),N.main.add(j`discardBySlice(vpos);
|
|
66
|
+
calculateOcclusionAndOutputHighlight();`);break;case i.ObjectAndLayerIdColor:S.include(s,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
|
|
67
|
+
if (waterColor.a < ${j.float(x)}) {
|
|
68
68
|
// Discard this vertex
|
|
69
69
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
70
70
|
return;
|
|
@@ -72,5 +72,5 @@ calculateOcclusionAndOutputHighlight();`);break;case i.ObjectAndLayerIdColor:S.i
|
|
|
72
72
|
|
|
73
73
|
vpos = position;
|
|
74
74
|
gl_Position = transformPosition(proj, view, vpos);
|
|
75
|
-
forwardObjectAndLayerIdColor();`),S.fragment.include(o,O),N.main.add(
|
|
75
|
+
forwardObjectAndLayerIdColor();`),S.fragment.include(o,O),N.main.add(j`discardBySlice(vpos);
|
|
76
76
|
outputObjectAndLayerIdColor();`)}return S}const S=Object.freeze(Object.defineProperty({__proto__:null,build:O},Symbol.toStringTag,{value:"Module"}));export{S as W,O as b};
|
package/copyright.txt
CHANGED
|
@@ -971,35 +971,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
971
971
|
|
|
972
972
|
-------------------------------------------------------------------------------
|
|
973
973
|
|
|
974
|
-
esri/libs/sortablejs/Sortable.js
|
|
975
|
-
|
|
976
|
-
Sortable — is a JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices.
|
|
977
|
-
https://github.com/SortableJS/Sortable
|
|
978
|
-
|
|
979
|
-
MIT License
|
|
980
|
-
|
|
981
|
-
Copyright (c) 2019 All contributors to Sortable
|
|
982
|
-
|
|
983
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
984
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
985
|
-
in the Software without restriction, including without limitation the rights
|
|
986
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
987
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
988
|
-
furnished to do so, subject to the following conditions:
|
|
989
|
-
|
|
990
|
-
The above copyright notice and this permission notice shall be included in all
|
|
991
|
-
copies or substantial portions of the Software.
|
|
992
|
-
|
|
993
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
994
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
995
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
996
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
997
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
998
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
999
|
-
SOFTWARE.
|
|
1000
|
-
|
|
1001
|
-
-------------------------------------------------------------------------------
|
|
1002
|
-
|
|
1003
974
|
vaadin/
|
|
1004
975
|
|
|
1005
976
|
https://github.com/vaadin/web-components/tree/main/packages/grid
|