@arcgis/core 4.33.0-next.20250429 → 4.33.0-next.20250430
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/analysis/AreaMeasurementAnalysis.js +1 -1
- package/applications/Components/baUtils.js +5 -0
- package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -1
- package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9a1c058d3ecd1db0e996.js → 0c338364cb55afdbd580.js} +1 -1
- package/assets/esri/core/workers/chunks/{4351b3e54b309935faed.js → 173737c60fa54f7d82bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{90dc783a617ff053e862.js → 181ad3cee0b30a72e7c7.js} +1 -1
- package/assets/esri/core/workers/chunks/210e057fe5e66abea984.js +1 -0
- package/assets/esri/core/workers/chunks/{9850ff14bd9c7da81c65.js → 23c76963481e38f39653.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1473d15c75fc560ea4a.js → 2ad47c0ba1680f7d5e03.js} +1 -1
- package/assets/esri/core/workers/chunks/2c3920ad82b9d86c3f05.js +1 -0
- package/assets/esri/core/workers/chunks/{4da99f058cca83937e9b.js → 2c92f6f268aa2de5432c.js} +1 -1
- package/assets/esri/core/workers/chunks/{12c9dd3932218238033b.js → 3a205f87f100832ef9f5.js} +1 -1
- package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{2fd5b48976cefe7cc0ab.js → 581180668e0229dcdc14.js} +1 -1
- package/assets/esri/core/workers/chunks/5c2299f22a69e58cc4dd.js +1 -0
- package/assets/esri/core/workers/chunks/60eb6dd09080da5653a1.js +1 -0
- package/assets/esri/core/workers/chunks/6210346dc9d064ac90af.js +1 -0
- package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js → 670a66617249f2d15a62.js} +2 -2
- package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js.LICENSE.txt → 670a66617249f2d15a62.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/710e03feaa25e357f17a.js +1 -0
- package/assets/esri/core/workers/chunks/{a6de903f22f76d875005.js → 7496c4c33c2d8f60a434.js} +1 -1
- package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +2 -0
- package/assets/esri/core/workers/chunks/{30551c1d3e4fa7be86c1.js.LICENSE.txt → 7b4523ab392966624d97.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{50ffb2620cdbcfd75723.js → 81b3351ea9627bb631d4.js} +1 -1
- package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +1 -0
- package/assets/esri/core/workers/chunks/84f972d7851d982701a0.js +319 -0
- package/assets/esri/core/workers/chunks/{f52e597dca4b32a81881.js → 867c6c5b2ee1db977c99.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js → 8a87c181b85d0b86b9bb.js} +2 -2
- package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js.LICENSE.txt → 8a87c181b85d0b86b9bb.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{a0c51c4c30a5f749dfc6.js → 8bf2e2fe5e3e8b4a1fa0.js} +1 -1
- package/assets/esri/core/workers/chunks/{213adc87c843d627c5d6.js → 8f2e0277c66247bd40b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{a600194cfe26aedc21dd.js → 9d32f41f8f69b8a507c3.js} +1 -1
- package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{899f197556b6ced6eddf.js → ad9b4e0164706c53b872.js} +2 -2
- package/assets/esri/core/workers/chunks/{1a6d2d090b643a87408a.js → b780c7062b1b18a5ae19.js} +1 -1
- package/assets/esri/core/workers/chunks/{72097a8247101018dcdf.js → ba4aafa8dfa76006c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +2 -0
- package/assets/esri/core/workers/chunks/{e524462c63834fae7e01.js.LICENSE.txt → c2594024d72133d3ed7b.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{5a821b7bf58eebb9062c.js → c607d618b64d3accecc4.js} +1 -1
- package/assets/esri/core/workers/chunks/c819535525e9a27bae1f.js +39 -0
- package/assets/esri/core/workers/chunks/{c3033f148213c960b906.js → cb25b45a6b385e60c68d.js} +307 -309
- package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js → ce9de24cb96b56d20562.js} +2 -2
- package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js.LICENSE.txt → ce9de24cb96b56d20562.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d30fae6233d3426615ed.js +1 -0
- package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{28317c8d7fa2eeeaf997.js → d92ea6b0674f34206ab6.js} +1 -1
- package/assets/esri/core/workers/chunks/{345993291540433d3d92.js → e93222c65bd28203ddf7.js} +1 -1
- package/assets/esri/themes/base/widgets/_SelectionList.scss +5 -17
- 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/chunks/BloomBlur.glsl.js +1 -1
- package/chunks/BloomComposition.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +33 -33
- package/chunks/DefaultMaterial.glsl.js +22 -22
- package/chunks/Fog.glsl.js +3 -3
- package/chunks/Haze.glsl.js +1 -1
- package/chunks/Path.glsl.js +22 -18
- package/chunks/RealisticTree.glsl.js +9 -9
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +5 -5
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/geometry/support/PolylineBuilder.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +5 -0
- package/geometry/support/curves/circleUtils.js +5 -0
- package/geometry/support/curves/circularArcUtils.js +5 -0
- package/geometry/support/curves/closestPointOnCurve.js +5 -0
- package/geometry/support/curves/curveUtils.js +5 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +5 -0
- package/geometry/support/curves/ellipticArc4Utils.js +5 -0
- package/geometry/support/curves/ellipticArc7Utils.js +5 -0
- package/geometry/support/curves/mathUtils.js +5 -0
- package/geometry/support/curves/splitCurveAtPoint.js +5 -0
- package/interfaces.d.ts +452 -17
- package/layers/VideoLayer.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/wasmUtils.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/effects/EffectSuppress.js +5 -0
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/Point3DSymbolRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/SimpleFeatureRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/factoryUtils.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.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/shading/AnalyticalSkyModel.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +15 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +27 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +28 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +12 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +9 -9
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +2 -20
- package/views/VideoView.js +1 -1
- package/webscene/support/FeatureReference.d.ts +4 -0
- package/webscene/support/FeatureReference.js +5 -0
- package/webscene/support/FeatureReferenceGlobalId.d.ts +4 -0
- package/webscene/support/FeatureReferenceGlobalId.js +5 -0
- package/webscene/support/FeatureReferenceId.d.ts +4 -0
- package/webscene/support/FeatureReferenceId.js +5 -0
- package/webscene/support/FeatureReferenceObjectId.d.ts +4 -0
- package/webscene/support/FeatureReferenceObjectId.js +5 -0
- package/webscene/support/LayerReference.d.ts +4 -0
- package/webscene/support/LayerReference.js +5 -0
- package/webscene/support/SlideElements.js +1 -1
- package/webscene/support/SlidePopupInfo.d.ts +4 -0
- package/webscene/support/SlidePopupInfo.js +5 -0
- package/webscene/support/featureReferenceUtils.js +5 -0
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/TableList/ListItemPanel.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/2e3019ce49e972a815ca.js +0 -1
- package/assets/esri/core/workers/chunks/30551c1d3e4fa7be86c1.js +0 -2
- package/assets/esri/core/workers/chunks/3293b4041c222299428f.js +0 -1
- package/assets/esri/core/workers/chunks/626ba3a7dee952308566.js +0 -1
- package/assets/esri/core/workers/chunks/97eedd6b90c6a9c67947.js +0 -1
- package/assets/esri/core/workers/chunks/b1e420cb425a3625170e.js +0 -319
- package/assets/esri/core/workers/chunks/bf4947fe446dcb477031.js +0 -1
- package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +0 -1
- package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +0 -1
- package/assets/esri/core/workers/chunks/def182fff5a0244b1c2c.js +0 -1
- package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +0 -2
- package/assets/esri/core/workers/chunks/e64e0c3240f8e577a61c.js +0 -39
- package/geometry/support/curveUtils.js +0 -5
- package/geometry/support/densifyUtils.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/Factory.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.js +0 -38
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.js +0 -35
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +0 -5
- package/widgets/support/InteractiveAnalysisViewModel.js +0 -5
package/chunks/BloomBlur.glsl.js
CHANGED
|
@@ -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{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{blurRadiusPresets as l}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{NoParameters as a}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";var c;!function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.COUNT=2]="COUNT"}(c||(c={}));class u extends a{constructor(){super(...arguments),this.blurRadius=l.sunny}}function m(l){const a=new n,u=a.fragment;a.include(r),
|
|
5
|
+
import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{blurRadiusPresets as l}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{NoParameters as a}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";var c;!function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.COUNT=2]="COUNT"}(c||(c={}));class u extends a{constructor(){super(...arguments),this.blurRadius=l.sunny}}function m(l){const a=new n,u=a.fragment;a.include(r),u.include(o),u.uniforms.add(new s("colorTexture",(e=>e.color)),new t("blurRadius",(e=>e.blurRadius)));let m="";const d=15;for(let e=0;e<d;e++){m+=`locations1D[${e}] = ${(e/(d-1)*2-1).toFixed(3).toString()};`}const f=2;let v="";for(let r=0;r<d;r++){v+=`locations1DWeights[${r}] = ${e(r-Math.floor(d/2),f).toFixed(7).toString()};`}const g=l.bloomStage===c.Horizontal;return u.code.add(i`
|
|
6
6
|
float locations1D[${i.int(d)}];
|
|
7
7
|
float locations1DWeights[${i.int(d)}];
|
|
8
8
|
|
|
@@ -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{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{defaultExposure as d,lodFactorsPresets as m}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{ToneMapping as n}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class b extends u{constructor(o=d,e=m.sunny.far,r=m.sunny.near){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const g=new b;class w extends b{constructor(){super(...arguments),this.bloomLod=-1}}function v(
|
|
5
|
+
import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{defaultExposure as d,lodFactorsPresets as m}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{ToneMapping as n}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class b extends u{constructor(o=d,e=m.sunny.far,r=m.sunny.near){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const g=new b;class w extends b{constructor(){super(...arguments),this.bloomLod=-1}}function v(){const d=new c,m=d.fragment;return d.include(o),m.include(r),m.include(e),m.include(n),m.uniforms.add(new a("colorTexture",(o=>o.color)),new a("emissionTexture",(o=>o.emission)),new a("bloomTexture0",(o=>o.bloomTexture0)),new a("bloomTexture1",(o=>o.bloomTexture1)),new a("bloomTexture2",(o=>o.bloomTexture2)),new a("bloomTexture3",(o=>o.bloomTexture3)),new a("bloomTexture4",(o=>o.bloomTexture4)),new l("exposure",(o=>o.exposure)),new i("bloomLod",(o=>o.bloomLod)),new s("lodFactors",(o=>o.lodFactors),5),new s("lodFactorsFront",(o=>o.lodFactorsFront),5)).main.add(t`vec4 color = texture(colorTexture, uv);
|
|
6
6
|
color = vec4(linearizeGamma(color.rgb), color.a);
|
|
7
7
|
vec4 lod0 = texture(bloomTexture0, uv);
|
|
8
8
|
lod0 = vec4(linearizeGamma(lod0.rgb), lod0.a);
|
|
@@ -25,4 +25,4 @@ emission = vec4(linearizeGamma(emission.rgb), emission.a);
|
|
|
25
25
|
emission += blur;
|
|
26
26
|
emission = vec4(tonemapACES(emission.rgb), emission.a);
|
|
27
27
|
fragColor = emission + color;
|
|
28
|
-
fragColor = delinearizeGamma(fragColor);`),
|
|
28
|
+
fragColor = delinearizeGamma(fragColor);`),d}const x=Object.freeze(Object.defineProperty({__proto__:null,BloomCompositionPassParameters:w,build:v,defaultCompositionParameters:g},Symbol.toStringTag,{value:"Module"}));export{w as B,x as a,v as b,g as d};
|
|
@@ -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{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as o,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as s}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as c}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as m}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";function g(g){const h=new d;h.include(s);const{reduced:p}=g,{fragment:u}=h;return a(u),
|
|
5
|
+
import{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as o,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as s}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as c}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as m}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";function g(g){const h=new d;h.include(s);const{reduced:p}=g,{fragment:u}=h;return a(u),u.include(r),u.include(c),u.include(m),u.include(e,!1),u.uniforms.add(new t("backgroundColor",(e=>e.backgroundColor)),new i("innerFadeDistance",(e=>e.innerFadeDistance)),new i("altitudeFade",(e=>e.altitudeFade)),new l("depthTexture",(e=>e.mainDepth))).code.add(o`vec4 applyUndergroundAtmosphere(vec3 rayDir, vec3 lightDirection, vec4 fragColor) {
|
|
6
6
|
float rayPlanetDistance = heightParameters[1] - radii[0] * radii[0];
|
|
7
7
|
vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, rayPlanetDistance);
|
|
8
8
|
if (!((rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.y > 0.0)) {
|
|
@@ -2,5 +2,5 @@
|
|
|
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{EvaluateAmbientLighting as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PBRMode as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{RgbaFloatEncoding as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as g}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as c}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as t}from"../views/webgl/ShaderBuilder.js";function m(){const m=new t,{fragment:u}=m;return m.include(c,{needUVs:!1,needEyeDirection:!1}),u.include(l),u.include(n),m.include(e,{pbrMode:i.Disabled,lightingSphericalHarmonicsOrder:2}),
|
|
5
|
+
import{EvaluateAmbientLighting as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PBRMode as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{RgbaFloatEncoding as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as g}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as c}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as t}from"../views/webgl/ShaderBuilder.js";function m(){const m=new t,{fragment:u}=m;return m.include(c,{needUVs:!1,needEyeDirection:!1}),u.include(l),u.include(n),m.include(e,{pbrMode:i.Disabled,lightingSphericalHarmonicsOrder:2}),u.include(o),u.include(r),m.include(s),u.uniforms.add(new d("cameraPosition",(e=>e.camera.eye)),new a("cloudsOpacity",(e=>e.clouds.opacity))).main.add(g`vec4 cloudsColor = renderClouds(normalize(worldRay), cameraPosition);
|
|
6
6
|
fragColor = vec4(cloudsOpacity * cloudsColor.rgb, cloudsColor.a);`),m}const u=Object.freeze(Object.defineProperty({__proto__:null,build:m},Symbol.toStringTag,{value:"Module"}));export{u as C,m as b};
|
|
@@ -2,14 +2,14 @@
|
|
|
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{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{OverlayContent as a}from"../views/3d/terrain/OverlayContent.js";import{ComponentData as i,ComponentDataType as l}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardMode.js";import{ForwardLinearDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d,isColorOrColorEmission as s}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as g}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as m}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{VertexNormal as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as p}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{computeFragmentNormals as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as y,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as L,addMainLightDirection as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PBRMode as N,PhysicallyBasedRenderingParameters as
|
|
5
|
+
import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{OverlayContent as a}from"../views/3d/terrain/OverlayContent.js";import{ComponentData as i,ComponentDataType as l}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardMode.js";import{ForwardLinearDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d,isColorOrColorEmission as s}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as g}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as m}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{VertexNormal as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as p}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{computeFragmentNormals as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as y,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as L,addMainLightDirection as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PBRMode as N,PhysicallyBasedRenderingParameters as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as M,getIMColorTexture as A}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{EllipsoidMode as W}from"../views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{If as P,glsl as B}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as R}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as z}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as E}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as I}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as V}from"../webscene/support/AlphaCutoff.js";function H(H){const _=new I,{vertex:G,fragment:k}=_;_.include(u,H),_.include(v,H),_.include(c,H),_.include(m,H),_.include(n,H),_.include(i,H),_.include(D,H),k.include(g,H),_.include(O,H),_.include(T,H);const{output:U,pbrMode:q,hasNormalTexture:J,snowCover:K,receiveShadows:Q,shadeNormals:X,spherical:Y,ellipsoidMode:Z,overlayEnabled:ee,componentData:oe,vertexDiscardMode:re,hasBloom:ae}=H,ie=q===N.Normal||q===N.Schematic;ie&&(_.include(S,H),J&&_.include(f,H));const le=U===d.Shadow||U===d.ShadowHighlight||U===d.ShadowExcludeHighlight,te=le&&oe===l.Varying;if(ee){_.include(y,H),_.include(M,H);const a=Z===W.Earth,i=Z===W.Earth,l=a?e.radius:i?o.radius:r.radius;G.code.add(`\n ${P(Y,`const float invRadius = ${B.float(1/l)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${P(Y,"/ (1.0 + invRadius * pos.z);")}; }`)}const ne=ee&&s(U)&&q===N.WaterOnIntegratedMesh;ne&&(_.varyings.add("tbnTangent","vec3"),_.varyings.add("tbnBiTangent","vec3"),_.varyings.add("groundNormal","vec3"));const de=re===t.None,se=re===t.Opaque,ge=1-1/255;if(G.main.add(B`
|
|
6
6
|
bool castShadows;
|
|
7
7
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
8
|
-
${P(
|
|
8
|
+
${P(te,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
|
|
9
9
|
|
|
10
|
-
${P(!
|
|
10
|
+
${P(!de,`{ if (externalColor.a ${se?">":"<="} ${B.float(ge)}) { gl_Position = vec4(vec3(1e38), 1.0); return; } }`)}
|
|
11
11
|
|
|
12
|
-
${P(
|
|
12
|
+
${P(U===d.ObjectAndLayerIdColor,"externalColor.a = 1.0;")}
|
|
13
13
|
|
|
14
14
|
forwardPosition(readElevationOffset());
|
|
15
15
|
forwardViewPosDepth(vPosition_view);
|
|
@@ -18,24 +18,24 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
18
18
|
forwardVertexColor();
|
|
19
19
|
forwardLinearDepth();
|
|
20
20
|
forwardObjectAndLayerIdColor();
|
|
21
|
-
${P(
|
|
21
|
+
${P(ne,Y?B`
|
|
22
22
|
groundNormal = normalize(positionWorld());
|
|
23
23
|
tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), groundNormal));
|
|
24
24
|
tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:B`
|
|
25
25
|
groundNormal = vec3(0.0, 0.0, 1.0);
|
|
26
26
|
tbnTangent = vec3(1.0, 0.0, 0.0);
|
|
27
27
|
tbnBiTangent = vec3(0.0, 1.0, 0.0);`)}
|
|
28
|
-
${P(
|
|
28
|
+
${P(ee,"setOverlayVTC(projectOverlay(position));")}
|
|
29
29
|
|
|
30
|
-
if (externalColor.a < ${B.float(
|
|
30
|
+
if (externalColor.a < ${B.float(V)}) {
|
|
31
31
|
// Discard this vertex
|
|
32
32
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
`),s(
|
|
35
|
+
`),s(U))return _.include(C,H),_.include(b,H),_.include(y,H),_.include(E,H),k.include(z,H),Q&&_.include($,H),k.code.add(B`
|
|
36
36
|
float evaluateShadow() {
|
|
37
|
-
return ${
|
|
38
|
-
}`),
|
|
37
|
+
return ${Q?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
|
|
38
|
+
}`),ee&&k.uniforms.add(new R("ovColorTex",((e,o)=>A(e,o)))),k.main.add(B`
|
|
39
39
|
discardBySlice(vPositionWorldCameraRelative);
|
|
40
40
|
discardByTerrainDepth();
|
|
41
41
|
|
|
@@ -47,49 +47,49 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
47
47
|
readExternalColor(externalColor, externalColorMixMode);
|
|
48
48
|
|
|
49
49
|
vec4 materialColor = computeMaterialColor(textureColor, externalColor, externalColorMixMode);
|
|
50
|
-
${P(
|
|
51
|
-
`),
|
|
50
|
+
${P(ee,B`vec4 overlayColor = getOverlayColor(ovColorTex, vtcOverlay);`)}
|
|
51
|
+
`),ie?(L(k),Y&&x(k),k.main.add(B`
|
|
52
52
|
applyPBRFactors();
|
|
53
|
-
${P(
|
|
53
|
+
${P(q===N.Normal,B`if (externalColorMixMode == 3) {
|
|
54
54
|
mrr = vec3(0.0, 0.6, 0.2);
|
|
55
55
|
}`)}
|
|
56
56
|
float additionalIrradiance = 0.02 * mainLightIntensity[2];
|
|
57
|
-
${P(
|
|
58
|
-
vec3 shadingNormal = ${
|
|
59
|
-
vec3 groundNormal = ${
|
|
57
|
+
${P(J,"mat3 tangentSpace = computeTangentSpace(fragmentFaceNormal, vPositionWorldCameraRelative, vuv0);")}
|
|
58
|
+
vec3 shadingNormal = ${J?"computeTextureNormal(tangentSpace, vuv0)":"fragmentShadingNormal"};
|
|
59
|
+
vec3 groundNormal = ${Y?B`normalize(positionWorld())`:B`vec3(0.0, 0.0, 1.0)`};
|
|
60
60
|
|
|
61
61
|
vec3 viewDir = normalize(vPositionWorldCameraRelative);
|
|
62
62
|
float ssao = 1.0 - occlusion * evaluateAmbientOcclusionInverse();
|
|
63
|
-
${P(
|
|
63
|
+
${P(K,B`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
|
|
64
64
|
materialColor.rgb = mix(materialColor.rgb, vec3(1.1), snow);
|
|
65
65
|
ssao = mix(ssao, 0.5 * ssao, snow);
|
|
66
66
|
shadingNormal = mix(shadingNormal, fragmentFaceNormal, snow);`)}
|
|
67
|
-
${P(
|
|
67
|
+
${P(ee,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
|
|
68
68
|
|
|
69
69
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
70
|
-
vec4 emission = ${
|
|
71
|
-
${P(
|
|
72
|
-
${
|
|
70
|
+
vec4 emission = ${ae?"vec4(0.0)":"getEmissions(materialColor.rgb)"};
|
|
71
|
+
${P(Y,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
|
|
72
|
+
${Y?B`float shadow = max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow());`:"float shadow = evaluateShadow();"}
|
|
73
73
|
vec4 shadedColor = vec4(evaluateSceneLightingPBR(shadingNormal, materialColor.rgb, shadow, ssao, additionalLight, viewDir, groundNormal, mrr, emission, additionalIrradiance), materialColor.a);
|
|
74
|
-
`)):(j(
|
|
75
|
-
${P(
|
|
76
|
-
float shadow = ${
|
|
74
|
+
`)):(j(k),Y&&x(k),ne&&k.uniforms.add(new F("ovNormalTex",(e=>e.overlay?.getTexture(a.WaterNormal)))),k.main.add(B`
|
|
75
|
+
${P(Y,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
|
|
76
|
+
float shadow = ${Q?Y?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow())":"evaluateShadow()":Y?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
|
|
77
77
|
|
|
78
|
-
${P(
|
|
78
|
+
${P(Q&&!X,B`
|
|
79
79
|
float dotFL = dot(fragmentFaceNormal, mainLightDirection);
|
|
80
80
|
if( dotFL <= 0.0) shadow = 1.0;
|
|
81
81
|
`)}
|
|
82
|
-
${P(
|
|
82
|
+
${P(K,B`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
|
|
83
83
|
materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);`)}
|
|
84
84
|
|
|
85
85
|
// At global scale we create some additional ambient light based on the main light to simulate global illumination
|
|
86
86
|
float ssao = evaluateAmbientOcclusion();
|
|
87
87
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
88
88
|
|
|
89
|
-
${P(
|
|
89
|
+
${P(ee,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
|
|
90
90
|
|
|
91
91
|
vec4 shadedColor = vec4(evaluateSceneLighting(fragmentShadingNormal, materialColor.rgb, shadow, ssao, additionalLight), materialColor.a);
|
|
92
|
-
${P(
|
|
92
|
+
${P(ne,B`vec4 overlayWaterMask = getOverlayColor(ovNormalTex, vtcOverlay);
|
|
93
93
|
float waterNormalLength = length(overlayWaterMask);
|
|
94
94
|
if (waterNormalLength > 0.95) {
|
|
95
95
|
mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, groundNormal);
|
|
@@ -98,13 +98,13 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
98
98
|
// un-gamma the ground color to mix in linear space
|
|
99
99
|
shadedColor = mix(shadedColor, waterColorNonLinear, waterColorLinear.w);
|
|
100
100
|
}`)}
|
|
101
|
-
`)),
|
|
101
|
+
`)),k.main.add(`outputColorHighlightOID(shadedColor, vPositionWorldCameraRelative, materialColor.rgb ${P(K,", snow")});`),_;const me=U===d.Normal,ce=U===d.ObjectAndLayerIdColor,ve=U===d.Highlight,ue=le||U===d.ViewshedShadow;return ue&&_.include(h,H),me&&_.include(b,H),ee&&_.include(p,H),_.include(w,H),k.main.add(B`
|
|
102
102
|
discardBySlice(vPositionWorldCameraRelative);
|
|
103
103
|
|
|
104
104
|
vec4 textureColor = readBaseColorTexture();
|
|
105
105
|
discardOrAdjustAlpha(textureColor);
|
|
106
106
|
|
|
107
|
-
${P(
|
|
108
|
-
${P(
|
|
109
|
-
${P(
|
|
110
|
-
${P(
|
|
107
|
+
${P(ue,"outputDepth(linearDepth);")}
|
|
108
|
+
${P(me,B`fragColor = vec4(vec3(0.5) + 0.5 * fragmentFaceNormalView, 1.0);`)}
|
|
109
|
+
${P(ce,ee?"fragColor = getOverlayColorTexel();":"outputObjectAndLayerIdColor();")}
|
|
110
|
+
${P(ve,P(ee,B`calculateOcclusionAndOutputHighlight(getAllOverlayHighlightValuesEncoded());`,B`calculateOcclusionAndOutputHighlight();`))}`),_}const _=Object.freeze(Object.defineProperty({__proto__:null,build:H},Symbol.toStringTag,{value:"Module"}));export{_ as C,H as b};
|
|
@@ -2,10 +2,10 @@
|
|
|
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{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}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 a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as l}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n,NormalType as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as b}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as
|
|
5
|
+
import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}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 a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as l}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n,NormalType as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as b}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as p,addAmbientBoostFactor as h,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as L,PBRMode as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as P,ReadShadowMapDraw as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as T,normalTextureUV as N,emissiveTextureUV as M,occlusionTextureUV as V,metallicRoughnessTextureUV as A}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as E}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as I,addCameraPosition as B}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as U}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as _}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as R,If as z}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as G}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as W}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{VertexAttribute as k}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as H}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as q}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as J}from"../webscene/support/AlphaCutoff.js";function K(K){const Q=new q,{attributes:X,vertex:Y,fragment:Z,varyings:ee}=Q,{output:re,normalType:oe,offsetBackfaces:ie,instancedColor:ae,spherical:le,receiveShadows:se,snowCover:ne,pbrMode:te,textureAlphaPremultiplied:de,instancedDoublePrecision:ce,hasVertexColors:me,hasVertexTangents:ge,hasColorTexture:ve,hasNormalTexture:be,hasNormalTextureTransform:ue,hasColorTextureTransform:we,hasBloom:pe}=K;if(I(Y,K),X.add(k.POSITION,"vec3"),ee.add("vpos","vec3",{invariant:!0}),Q.include($,K),Q.include(s,K),Q.include(v,K),Q.include(T,K),!i(re))return Q.include(b,K),Q;Q.include(N,K),Q.include(M,K),Q.include(V,K),Q.include(A,K),B(Y,K),Q.include(n,K),Q.include(l,K);const he=oe===t.Attribute||oe===t.Compressed;return he&&ie&&Q.include(o),Q.include(u,K),Q.include(g,K),ae&&Q.attributes.add(k.INSTANCECOLOR,"vec4"),ee.add("vPositionLocal","vec3"),Q.include(c,K),Q.include(r,K),Q.include(d,K),Q.include(m,K),Y.uniforms.add(new F("externalColor",(r=>"ignore"===r.colorMixMode?e:r.externalColor))),ee.add("vcolorExt","vec4"),Q.include(O,K),Y.main.add(R`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
vcolorExt = externalColor;
|
|
8
|
-
${z(
|
|
8
|
+
${z(ae,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
9
9
|
vcolorExt *= vvColor();
|
|
10
10
|
vcolorExt *= getSymbolColor();
|
|
11
11
|
forwardColorMixMode();
|
|
@@ -15,9 +15,9 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
15
15
|
vpos = subtractOrigin(vpos);
|
|
16
16
|
${z(he,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
17
17
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
18
|
-
${z(
|
|
18
|
+
${z(ge,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
19
19
|
gl_Position = transformPosition(proj, view, vpos);
|
|
20
|
-
${z(he&&
|
|
20
|
+
${z(he&&ie,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
21
21
|
|
|
22
22
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
23
23
|
forwardLinearDepth();
|
|
@@ -28,18 +28,18 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
28
28
|
forwardOcclusionUV();
|
|
29
29
|
forwardMetallicRoughnessUV();
|
|
30
30
|
|
|
31
|
-
if (vcolorExt.a < ${R.float(
|
|
31
|
+
if (vcolorExt.a < ${R.float(J)}) {
|
|
32
32
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
33
33
|
}
|
|
34
|
-
`),
|
|
34
|
+
`),Q.include(p,K),Z.include(w,K),Q.include(D,K),Q.include(ce?P:S,K),Z.include(a,K),Q.include(H,K),B(Z,K),Z.uniforms.add(Y.uniforms.get("localOrigin"),new U("ambient",(e=>e.ambient)),new U("diffuse",(e=>e.diffuse)),new _("opacity",(e=>e.opacity)),new _("layerOpacity",(e=>e.layerOpacity))),ve&&Z.uniforms.add(new G("tex",(e=>e.texture))),Q.include(L,K),Z.include(C,K),Z.include(E),Q.include(y,K),Z.include(W,K),h(Z),f(Z),x(Z),Z.main.add(R`
|
|
35
35
|
discardBySlice(vpos);
|
|
36
36
|
discardByTerrainDepth();
|
|
37
|
-
${
|
|
38
|
-
vec4 texColor = texture(tex, ${
|
|
39
|
-
${z(
|
|
37
|
+
${ve?R`
|
|
38
|
+
vec4 texColor = texture(tex, ${we?"colorUV":"vuv0"});
|
|
39
|
+
${z(de,"texColor.rgb /= texColor.a;")}
|
|
40
40
|
discardOrAdjustAlpha(texColor);`:R`vec4 texColor = vec4(1.0);`}
|
|
41
41
|
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
42
|
-
${
|
|
42
|
+
${oe===t.ScreenDerivative?R`vec3 normal = screenDerivativeNormal(vPositionLocal);`:R`shadingParams.normalView = vNormalWorld;
|
|
43
43
|
vec3 normal = shadingNormal(shadingParams);`}
|
|
44
44
|
applyPBRFactors();
|
|
45
45
|
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
@@ -47,27 +47,27 @@ import{ONES as e}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{Forw
|
|
|
47
47
|
vec3 posWorld = vpos + localOrigin;
|
|
48
48
|
|
|
49
49
|
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
50
|
-
float shadow = ${
|
|
50
|
+
float shadow = ${se?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":z(le,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
51
51
|
|
|
52
52
|
vec3 matColor = max(ambient, diffuse);
|
|
53
|
-
vec3 albedo = mixExternalColor(${z(
|
|
54
|
-
float opacity_ = layerOpacity * mixExternalOpacity(${z(
|
|
55
|
-
${
|
|
56
|
-
vec3 normalGround = ${
|
|
53
|
+
vec3 albedo = mixExternalColor(${z(me,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
54
|
+
float opacity_ = layerOpacity * mixExternalOpacity(${z(me,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, int(colorMixMode));
|
|
55
|
+
${be?`mat3 tangentSpace = computeTangentSpace(${ge?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${ue?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
56
|
+
vec3 normalGround = ${le?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
57
57
|
|
|
58
|
-
${z(
|
|
59
|
-
float snow =
|
|
58
|
+
${z(ne,R`
|
|
59
|
+
float snow = getSnow(normal, normalGround);
|
|
60
60
|
albedo = mix(albedo, vec3(1), snow);
|
|
61
61
|
shadingNormal = mix(shadingNormal, normal, snow);
|
|
62
62
|
ssao = mix(ssao, 1.0, snow);`)}
|
|
63
63
|
|
|
64
64
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
65
65
|
|
|
66
|
-
${
|
|
66
|
+
${te===j.Normal||te===j.Schematic?R`
|
|
67
67
|
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
68
|
-
vec4 emission = ${
|
|
69
|
-
${z(
|
|
68
|
+
vec4 emission = ${pe?"vec4(0.0)":"getEmissions(albedo)"};
|
|
69
|
+
${z(ne,"mrr = applySnowToMRR(mrr, snow);\n emission = snowCoverForEmissions(emission, snow);")}
|
|
70
70
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:R`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
71
71
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
72
|
-
outputColorHighlightOID(finalColor, vpos, albedo);
|
|
73
|
-
`),
|
|
72
|
+
outputColorHighlightOID(finalColor, vpos, albedo ${z(ne,", snow")});
|
|
73
|
+
`),Q}const Q=Object.freeze(Object.defineProperty({__proto__:null,build:K},Symbol.toStringTag,{value:"Module"}));export{Q as D,K as b};
|
package/chunks/Fog.glsl.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
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{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float3BindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as m}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as l}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as d
|
|
5
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float3BindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as m}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as l}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as d}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as g}from"../views/webgl/NoParameters.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class c extends g{constructor(){super(...arguments),this.color=e(),this.strength=4e-6,this.atmosphereC=1,this.amount=0}}function f(){const e=new p;e.include(m,{needUVs:!0,needEyeDirection:!0});const g=e.fragment;return g.uniforms.add(new s("atmosphereC",(e=>e.atmosphereC)),new a("cameraPosition",(e=>e.camera.eye)),new n("depthTexture",(e=>e.mainDepth)),new s("fogStrength",(e=>e.strength)),new s("fogAmount",(e=>e.amount)),new t("fogColor",(e=>e.color))),g.include(o),g.include(l),g.include(d),g.include(r),g.code.add(i`float getFogAmount(float dist, vec3 rayDir) {
|
|
6
6
|
if(dist == -1.0){
|
|
7
7
|
dist = 0.055 * sphereIntersect(cameraPosition, rayDir, atmosphereC).y;
|
|
8
8
|
}
|
|
9
9
|
return fogAmount * (1.0 - exp(-dist * fogStrength));
|
|
10
|
-
}`),
|
|
10
|
+
}`),g.main.add(i`vec3 rayDir = normalize(worldRay);
|
|
11
11
|
float terrainDepth = -1.0;
|
|
12
12
|
float depthSample = depthFromTexture(depthTexture, uv);
|
|
13
13
|
if(depthSample < 1.0 && depthSample > 0.0){
|
|
@@ -18,4 +18,4 @@ terrainDepth = max(0.0, length(cameraSpaceRay));
|
|
|
18
18
|
}
|
|
19
19
|
float fogAmount = getFogAmount(terrainDepth, rayDir);
|
|
20
20
|
vec4 fog = vec4(fogColor, 1.0) * fogAmount;
|
|
21
|
-
fragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));`),e}const
|
|
21
|
+
fragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,FogPassParameters:c,build:f},Symbol.toStringTag,{value:"Module"}));export{c as F,h as a,f as b};
|
package/chunks/Haze.glsl.js
CHANGED
|
@@ -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{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as n,If as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as s}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as p}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";function h(h){const m=new c,{fragment:g}=m;m.include(d),a(g),
|
|
5
|
+
import{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as n,If as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as s}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as p}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";function h(h){const m=new c,{fragment:g}=m;m.include(d),a(g),g.include(t),g.include(r),g.include(s),g.include(p),g.include(e,!0),g.uniforms.add(new l("depthTexture",(e=>e.mainDepth)),new i("hazeStrength",(e=>e.hazeStrength)));const{reduced:u}=h;return u&&g.code.add(n`float getDepth(vec2 uv){
|
|
6
6
|
return linearDepthFromTexture(depthTexture, uv);
|
|
7
7
|
}
|
|
8
8
|
float textureBilinear(vec2 uv) {
|
package/chunks/Path.glsl.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
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,addNearFar as i}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{isColorOrColorEmission as
|
|
5
|
+
import{ForwardLinearDepth as e,addNearFar as i}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{isColorOrColorEmission as o,ShaderOutput as a}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as n}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{PathVertexPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{OutputDepth as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as m,addAmbientBoostFactor as g,addLightingGlobalFactor as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as b,PBRMode as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as j}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as L,addViewNormal as P,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as O}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as C}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as A,If as D}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as I}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as B}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as F}from"../views/webgl/ShaderBuilder.js";function x(x){const V=new F,{vertex:_,fragment:M,varyings:$}=V;L(_,x),$.add("vpos","vec3",{invariant:!0}),V.include(s,x);const{output:z,spherical:H,pbrMode:N,receiveShadows:E,hasBloom:G,snowCover:T}=x,k=o(z);switch((k||z===a.ObjectAndLayerIdColor)&&(V.include(n,x),V.include(f,x),V.include(e,x),V.include(l,x),V.include(y,x),$.add("vnormal","vec3"),$.add("vcolor","vec4"),_.main.add(A`
|
|
6
6
|
vpos = calculateVPos();
|
|
7
7
|
vnormal = normalize(localNormal());
|
|
8
8
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
9
9
|
|
|
10
10
|
gl_Position = transformPosition(proj, view, vpos);
|
|
11
11
|
|
|
12
|
-
${
|
|
12
|
+
${k?"forwardLinearDepth();":""}
|
|
13
13
|
forwardObjectAndLayerIdColor();
|
|
14
14
|
|
|
15
|
-
vcolor = getColor();`)),
|
|
15
|
+
vcolor = getColor();`)),z){case a.ColorEmission:case a.Color:V.include(b,x),V.include(m,x),M.include(c,x),V.include(f,x),V.include(p,x),M.include(r,x),V.include(B,x),S(M,x),g(M),v(M),M.uniforms.add(_.uniforms.get("localOrigin"),new O("ambient",(e=>e.ambient)),new O("diffuse",(e=>e.diffuse)),new C("opacity",(e=>e.opacity))),M.include(j),M.include(I,x),h(M),M.main.add(A`
|
|
16
16
|
discardBySlice(vpos);
|
|
17
17
|
discardByTerrainDepth();
|
|
18
18
|
|
|
@@ -24,26 +24,30 @@ import{ForwardLinearDepth as e,addNearFar as i}from"../views/3d/webgl-engine/cor
|
|
|
24
24
|
vec3 posWorld = vpos + localOrigin;
|
|
25
25
|
vec3 normalGround = ${H?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
26
26
|
|
|
27
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
28
|
-
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
29
|
-
float shadow = ${$?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth));":H?"lightingGlobalFactor * (1.0 - additionalAmbientScale);":"0.0;"}
|
|
30
27
|
vec3 albedo = vcolor.rgb * max(ambient, diffuse); // combine the old material parameters into a single one
|
|
31
28
|
float combinedOpacity = vcolor.a * opacity;
|
|
32
|
-
albedo += 0.25 * specular; // don't completely ignore specular for now
|
|
33
29
|
|
|
34
|
-
${D(
|
|
30
|
+
${D(T,A`float snow = getSnow(normal, normalGround);
|
|
31
|
+
albedo = mix(albedo, vec3(1), snow);
|
|
32
|
+
ssao = mix(ssao, 1.0, snow);`)}
|
|
33
|
+
|
|
34
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
35
|
+
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
36
|
+
float shadow = ${E?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth));":H?"lightingGlobalFactor * (1.0 - additionalAmbientScale);":"0.0;"}
|
|
37
|
+
|
|
38
|
+
${D(N===u.Schematic,`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];\n vec4 emission = ${G?"vec4(0.0)":"getEmissions(albedo)"};\n ${D(T,"mrr = applySnowToMRR(mrr, snow);\n emission = snowCoverForEmissions(emission, snow);")}`)}
|
|
35
39
|
|
|
36
|
-
vec3 shadedColor = ${N===
|
|
40
|
+
vec3 shadedColor = ${N===u.Schematic?"evaluateSceneLightingPBR(normal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);":"evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight);"}
|
|
37
41
|
vec4 finalColor = vec4(shadedColor, combinedOpacity);
|
|
38
|
-
outputColorHighlightOID(finalColor, vpos, albedo);`);break;case
|
|
39
|
-
gl_Position = transformPosition(proj, view, vpos);`),V.fragment.include(r,
|
|
40
|
-
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),V.fragment.include(r,
|
|
41
|
-
outputDepth(depth);`);break;case
|
|
42
|
-
outputObjectAndLayerIdColor();`);break;case
|
|
42
|
+
outputColorHighlightOID(finalColor, vpos, albedo ${D(T,", snow")});`);break;case a.Depth:V.include(n,x),_.main.add(A`vpos = calculateVPos();
|
|
43
|
+
gl_Position = transformPosition(proj, view, vpos);`),V.fragment.include(r,x),M.main.add(A`discardBySlice(vpos);`);break;case a.Shadow:case a.ShadowHighlight:case a.ShadowExcludeHighlight:case a.ViewshedShadow:V.include(n,x),i(V),$.add("depth","float"),_.main.add(A`vpos = calculateVPos();
|
|
44
|
+
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),V.fragment.include(r,x),V.include(d,x),M.main.add(A`discardBySlice(vpos);
|
|
45
|
+
outputDepth(depth);`);break;case a.ObjectAndLayerIdColor:V.fragment.include(r,x),M.main.add(A`discardBySlice(vpos);
|
|
46
|
+
outputObjectAndLayerIdColor();`);break;case a.Normal:V.include(n,x),V.include(w,x),P(_),$.add("vnormal","vec3"),_.main.add(A`vpos = calculateVPos();
|
|
43
47
|
vnormal = normalize((viewNormal * vec4(localNormal(), 1.0)).xyz);
|
|
44
|
-
gl_Position = transformPosition(proj, view, vpos);`),V.fragment.include(r,
|
|
48
|
+
gl_Position = transformPosition(proj, view, vpos);`),V.fragment.include(r,x),M.main.add(A`discardBySlice(vpos);
|
|
45
49
|
vec3 normal = normalize(vnormal);
|
|
46
50
|
if (gl_FrontFacing == false) normal = -normal;
|
|
47
|
-
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case
|
|
48
|
-
gl_Position = transformPosition(proj, view, vpos);`),V.fragment.include(r,
|
|
49
|
-
calculateOcclusionAndOutputHighlight();`)}return V}const V=Object.freeze(Object.defineProperty({__proto__:null,build:
|
|
51
|
+
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case a.Highlight:V.include(n,x),V.include(w,x),$.add("vnormal","vec3"),_.main.add(A`vpos = calculateVPos();
|
|
52
|
+
gl_Position = transformPosition(proj, view, vpos);`),V.fragment.include(r,x),V.include(t,x),M.main.add(A`discardBySlice(vpos);
|
|
53
|
+
calculateOcclusionAndOutputHighlight();`)}return V}const V=Object.freeze(Object.defineProperty({__proto__:null,build:x},Symbol.toStringTag,{value:"Module"}));export{V as P,x as b};
|