@arcgis/core 5.2.0-next.50 → 5.2.0-next.52
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{de50a19944617cd426b8.js → 0ffd0190adfed8e5937a.js} +1 -1
- package/assets/esri/core/workers/chunks/{877c848beaf9a939862c.js → 290fbc6d32c799841ccc.js} +1 -1
- package/assets/esri/core/workers/chunks/{851bcc75acac4a2f199b.js → 2d6d2d4df05bba9fa4a6.js} +1 -1
- package/assets/esri/core/workers/chunks/{304a22c580ce103480cb.js → 2fbb00a29faeaa02912b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d0a9d465ec3a8ba1ed2.js → 5d6d07ecebf881ad913f.js} +1 -1
- package/assets/esri/core/workers/chunks/{0037a878499d8a512772.js → 61d3fcb419d6bf7e355e.js} +38 -19
- package/assets/esri/core/workers/chunks/{cdb331b58e22f8c1c988.js → 77f19d204a4673b1e676.js} +2 -2
- package/assets/esri/core/workers/chunks/{1bc45872d22d61dbd7d1.js → 7e2bf6dd26c3cf0b49b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{baac90da0703891d59c4.js → 847ce06b14a921cd16f0.js} +1 -1
- package/assets/esri/core/workers/chunks/a1fcef22b6151a7f7917.js +1 -0
- package/assets/esri/core/workers/chunks/{0ea374f7b16745b9bbc7.js → a239f1e82dde4f7ada32.js} +1 -1
- package/assets/esri/core/workers/chunks/{47af3525396f890f2a6b.js → c38992b250731137cb1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ec8b02e097cf6718462.js → ce719d3aec8b52bfe160.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0b37c67a14a4dfb6538.js → cef7f4237539574f0730.js} +1 -1
- package/chunks/CutFillMinMaxDepth.glsl.js +1 -1
- package/chunks/CutFillReduction.glsl.js +5 -14
- package/chunks/CutFillTotalDepth.glsl.js +1 -1
- package/chunks/GlobalIllumination.glsl.js +41 -30
- package/chunks/GlobalIlluminationBlur.glsl.js +19 -11
- package/chunks/GlobalIlluminationUpscale.glsl.js +10 -10
- package/chunks/GlowBlur.glsl.js +1 -1
- package/chunks/GlowComposite.glsl.js +1 -1
- package/chunks/Stars.glsl.js +7 -12
- package/config.js +1 -1
- package/core/types.d.ts +5 -1
- package/kernel.js +1 -1
- package/package.json +3 -3
- package/rest/networks/support/TraverseAssociationsParameters.d.ts +26 -4
- package/support/revision.js +1 -1
- package/third-party-notices.txt +0 -66
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/LineOfSight/types.d.ts +28 -0
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +7 -7
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/Manipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReductionTechniqueConfiguration.js +1 -1
- package/views/SceneView.d.ts +24 -12
- package/views/SceneView.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +1 -1
- package/assets/esri/core/workers/chunks/5ce168ae45ab7e7a71d1.js +0 -1
- /package/assets/esri/core/workers/chunks/{cdb331b58e22f8c1c988.js.LICENSE.txt → 77f19d204a4673b1e676.js.LICENSE.txt} +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{ScreenSpaceRayMarching as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{ScreenSpaceRayMarching as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{FloatBindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as c,If as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as u}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{floatBlendReductionFactor as p}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ColorAttachment1 as g,SizedPixelFormat as f}from"../views/webgl/enums.js";import{NoParameters as x}from"../views/webgl/NoParameters.js";import{ShaderBuilder as v}from"../views/webgl/ShaderBuilder.js";const y=.01,M=.008,b=.002,w=.5,S=.02,W=.1,D=.008,F=.3,R=.008,B=150,j=.095,I=.008,C=60,z=2,G=.0039,P=.25,T=.012,$=0,E=6,L=.15,O=25,V=.15,U=.5,N=1,k=1,Q=16;class H extends x{constructor(){super(...arguments),this.projScale=1,this.scaleGlobalIllumination=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.rayMarchMinReach=V,this.rayMarchMaxReach=U,this.rayMarchWorldReach=O,this.rayMarchMinReachEmissionWeight=N,this.rayMarchMaxReachEmissionWeight=k,this.rayMarchMaxSteps=Q,this.colorBleedWeight=L,this.highQualityIdleColorBlendStart=F}}function _(x){const F=new v,L=F.fragment;F.include(e),F.include(l),r(L),L.include(a),L.include(t),L.include(u),F.include(o,x),L.uniforms.add(new d("normalMap",e=>e.normalTexture),new d("depthMap",e=>e.depthTexture),new h("lastFrameColorTexture",e=>e.reprojection.lastFrameColor?.getTexture()),new h("lastFrameDepthTexture",e=>e.reprojection.lastFrameDepth?.attachment),new h("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new h("lastFrameGlobalIlluminationWeightTexture",e=>e.globalIllumination?.getTexture(g)),new m("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new m("view",e=>e.camera.viewMatrix),new n("accumulatedFrames",e=>e.accumulatedFrames),new n("temporalSampleFrame",e=>e.temporalSampleFrame),new n("scaleGlobalIllumination",e=>e.scaleGlobalIllumination)),L.uniforms.add(new n("rayMarchMinReach",e=>e.rayMarchMinReach),new n("rayMarchMaxReach",e=>e.rayMarchMaxReach),new n("rayMarchWorldReach",e=>e.rayMarchWorldReach),new n("rayMarchMinReachEmissionWeight",e=>e.rayMarchMinReachEmissionWeight),new n("rayMarchMaxReachEmissionWeight",e=>e.rayMarchMaxReachEmissionWeight),new n("rayMarchMaxSteps",e=>e.rayMarchMaxSteps),new n("colorBleedWeight",e=>e.colorBleedWeight),new n("highQualityIdleColorBlendStart",e=>e.highQualityIdleColorBlendStart));const{hasEmission:O,hasColor:V}=x;return O&&L.uniforms.add(new i("inputScale",e=>e.reprojection.lastFrameEmission?.attachment.descriptor.internalFormat===f.RGBA8?p:1),new h("lastFrameEmissionTexture",e=>e.reprojection.lastFrameEmission?.attachment)),L.code.add(c`
|
|
3
3
|
float computeIdleColorBlendWeight(float accumulatedFrames) {
|
|
4
4
|
float idleColorBlendProgress = clamp(
|
|
5
|
-
accumulatedFrames / ${
|
|
5
|
+
accumulatedFrames / ${c.float(B)},
|
|
6
6
|
0.0,
|
|
7
7
|
1.0
|
|
8
8
|
);
|
|
9
9
|
return mix(
|
|
10
|
-
|
|
11
|
-
${
|
|
12
|
-
idleColorBlendProgress
|
|
10
|
+
highQualityIdleColorBlendStart,
|
|
11
|
+
${c.float(R)},
|
|
12
|
+
pow(idleColorBlendProgress, 1./5.)
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
float computeIdleOcclusionBlendWeight(float accumulatedFrames) {
|
|
17
17
|
float idleOcclusionBlendProgress = clamp(
|
|
18
|
-
accumulatedFrames / ${
|
|
18
|
+
accumulatedFrames / ${c.float(C)},
|
|
19
19
|
0.0,
|
|
20
20
|
1.0
|
|
21
21
|
);
|
|
22
22
|
return mix(
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
pow(idleOcclusionBlendProgress, ${
|
|
23
|
+
${c.float(j)},
|
|
24
|
+
${c.float(I)},
|
|
25
|
+
pow(idleOcclusionBlendProgress, ${c.float(z)})
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -77,13 +77,13 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
77
77
|
|
|
78
78
|
return value * 2.0 - 1.0;
|
|
79
79
|
}
|
|
80
|
-
`),
|
|
80
|
+
`),F.outputs.add("fragGlobalIllumination","vec4",0),F.outputs.add("fragWeight","vec2",1),L.main.add(c`
|
|
81
81
|
float depth = depthFromTexture(depthMap, uv);
|
|
82
82
|
|
|
83
83
|
// Early out if depth is out of range, such as in the sky
|
|
84
84
|
if (depth >= 1.0 || depth <= 0.0) {
|
|
85
85
|
fragGlobalIllumination = vec4(0.0, 0.0, 0.0, 1.0);
|
|
86
|
-
fragWeight = 0.0;
|
|
86
|
+
fragWeight = vec2(0.0);
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -92,7 +92,7 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
92
92
|
vec4 normal4 = texelFetch(normalMap, iuv, 0);
|
|
93
93
|
if (normal4.a != 1.0) {
|
|
94
94
|
fragGlobalIllumination = vec4(0.0, 0.0, 0.0, 1.0);
|
|
95
|
-
fragWeight = 0.0;
|
|
95
|
+
fragWeight = vec2(0.0);
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
vec3 normal = normalize(normal4.xyz * 2.0 - 1.0);
|
|
@@ -117,7 +117,7 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
117
117
|
float idleColorBlendWeight = computeIdleColorBlendWeight(accumulatedFrames);
|
|
118
118
|
float idleOcclusionBlendWeight = computeIdleOcclusionBlendWeight(accumulatedFrames);
|
|
119
119
|
float reprojectionDepthMismatch = abs((lastFrameDepthViewPos + reprojectedViewPos.z) / max(lastFrameDepthViewPos, reprojectedViewPos.z));
|
|
120
|
-
bool hasReprojectionMismatch = reprojectionDepthMismatch > ${
|
|
120
|
+
bool hasReprojectionMismatch = reprojectionDepthMismatch > ${c.float(y)};
|
|
121
121
|
bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
|
|
122
122
|
bool isLowQualityEdgePixel = isScaledGlobalIllumination && isEdgeDepth(currentPixelDepth, uv);
|
|
123
123
|
bool resetColorHistory = false;
|
|
@@ -126,7 +126,7 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
126
126
|
if (hasReprojectionMismatch) {
|
|
127
127
|
if (isLowQualityEdgePixel) {
|
|
128
128
|
steps = 1;
|
|
129
|
-
occlusionBlendWeight = ${
|
|
129
|
+
occlusionBlendWeight = ${c.float(M)};
|
|
130
130
|
resetColorHistory = true;
|
|
131
131
|
} else {
|
|
132
132
|
steps = 6;
|
|
@@ -135,15 +135,15 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
135
135
|
}
|
|
136
136
|
} else {
|
|
137
137
|
steps = 1;
|
|
138
|
-
if (historyOcclusionBlendWeight > ${
|
|
139
|
-
occlusionBlendWeight = ${
|
|
140
|
-
colorBlendWeight = ${
|
|
141
|
-
} else if (historyOcclusionBlendWeight > ${
|
|
138
|
+
if (historyOcclusionBlendWeight > ${c.float(w)}) {
|
|
139
|
+
occlusionBlendWeight = ${c.float(W)};
|
|
140
|
+
colorBlendWeight = ${c.float(D)};
|
|
141
|
+
} else if (historyOcclusionBlendWeight > ${c.float(S)}) {
|
|
142
142
|
occlusionBlendWeight = historyOcclusionBlendWeight - 0.05;
|
|
143
|
-
colorBlendWeight = ${
|
|
143
|
+
colorBlendWeight = ${c.float(D)};
|
|
144
144
|
} else {
|
|
145
|
-
occlusionBlendWeight = isScaledGlobalIllumination ? ${
|
|
146
|
-
colorBlendWeight = isScaledGlobalIllumination ? ${
|
|
145
|
+
occlusionBlendWeight = isScaledGlobalIllumination ? ${c.float(M)} : idleOcclusionBlendWeight;
|
|
146
|
+
colorBlendWeight = isScaledGlobalIllumination ? ${c.float(b)} : idleColorBlendWeight;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -154,6 +154,17 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
154
154
|
|
|
155
155
|
// For each ray determine if it hits geometry and accumulate occlusion or color
|
|
156
156
|
float stepSize = 1.0 / float(steps);
|
|
157
|
+
${s(V,c`
|
|
158
|
+
float colorBleedScale = mix(
|
|
159
|
+
1.0,
|
|
160
|
+
${c.float($)},
|
|
161
|
+
smoothstep(
|
|
162
|
+
${c.float(T)},
|
|
163
|
+
highQualityIdleColorBlendStart,
|
|
164
|
+
colorBlendWeight
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
`)}
|
|
157
168
|
for (int i = 0; i < steps; ++i) {
|
|
158
169
|
float sampleIndex = float(i * temporalSampleStride + int(temporalFrameOffset));
|
|
159
170
|
randomDirectionSample = blueNoiseDither(floor(gl_FragCoord.xy), sampleIndex);
|
|
@@ -173,21 +184,21 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
173
184
|
);
|
|
174
185
|
|
|
175
186
|
if (hit.z > 0.0) {
|
|
176
|
-
${
|
|
187
|
+
${s(V,c`
|
|
177
188
|
// Emission and color bleed - Reproject the current receiver and sampled hit to estimate bounced color
|
|
178
189
|
vec3 receiverColor = texture(lastFrameColorTexture, reprojectedCoordinate.xy).rgb;
|
|
179
190
|
|
|
180
191
|
vec2 hitReprojectedCoordinate = reprojectionCoordinate(hit);
|
|
181
192
|
vec3 sourceColor = texture(lastFrameColorTexture, hitReprojectedCoordinate).rgb;
|
|
182
193
|
vec3 sourceColorLinear = linearizeGamma(sourceColor);
|
|
183
|
-
vec3 sourceEmission = ${
|
|
194
|
+
vec3 sourceEmission = ${s(O,"texture(lastFrameEmissionTexture, hitReprojectedCoordinate).xyz * inputScale","vec3(0.0)")};
|
|
184
195
|
|
|
185
196
|
float emissionWeight = mix(
|
|
186
197
|
rayMarchMinReachEmissionWeight,
|
|
187
198
|
rayMarchMaxReachEmissionWeight,
|
|
188
199
|
(rayMarchScreenReach - rayMarchMinReach) / max(rayMarchMaxReach - rayMarchMinReach, 0.00001)
|
|
189
200
|
);
|
|
190
|
-
fragGlobalIllumination.rgb += ((sourceColorLinear * colorBleedWeight) + sourceEmission * emissionWeight) * stepSize;
|
|
201
|
+
fragGlobalIllumination.rgb += ((sourceColorLinear * colorBleedWeight * colorBleedScale) + sourceEmission * emissionWeight) * stepSize;
|
|
191
202
|
`)}
|
|
192
203
|
} else {
|
|
193
204
|
// Occlusion - heuristic modulating sky intensity based on angle to main light
|
|
@@ -201,17 +212,17 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
201
212
|
|
|
202
213
|
// Rendering trick add noise to reduce accumulation artifacts
|
|
203
214
|
float accumulationDither = occlusionBlendWeight < 1.0
|
|
204
|
-
? randomDirectionSample.b * ${
|
|
215
|
+
? randomDirectionSample.b * ${c.float(G)}
|
|
205
216
|
: 0.0;
|
|
206
217
|
|
|
207
|
-
${
|
|
218
|
+
${s(V,c`
|
|
208
219
|
// Accumulate color
|
|
209
220
|
vec3 lastFrameColor = lastFrameGlobalIllumination.rgb;
|
|
210
|
-
float colorDitherScale = isScaledGlobalIllumination ? ${
|
|
221
|
+
float colorDitherScale = isScaledGlobalIllumination ? ${c.float(P)} : 1.0;
|
|
211
222
|
fragGlobalIllumination.rgb = resetColorHistory
|
|
212
223
|
? vec3(0.0)
|
|
213
224
|
: mix(lastFrameColor + accumulationDither * colorDitherScale, fragGlobalIllumination.rgb, colorBlendWeight);
|
|
214
|
-
`,
|
|
225
|
+
`,c`
|
|
215
226
|
fragGlobalIllumination.rgb = vec3(0.0);
|
|
216
227
|
`)}
|
|
217
228
|
fragGlobalIllumination.rgb = quantizeGlobalIlluminationColor(fragGlobalIllumination.rgb);
|
|
@@ -219,5 +230,5 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
219
230
|
// Accumulate occlusion
|
|
220
231
|
fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
|
|
221
232
|
|
|
222
|
-
fragWeight = occlusionBlendWeight;
|
|
223
|
-
`),
|
|
233
|
+
fragWeight = vec2(occlusionBlendWeight, colorBlendWeight * ${c.float(E)});
|
|
234
|
+
`),F}const q=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:H,build:_,defaultColorBleedWeight:L,defaultRayMarchMaxReach:U,defaultRayMarchMaxReachEmissionWeight:k,defaultRayMarchMaxSteps:Q,defaultRayMarchMinReach:V,defaultRayMarchMinReachEmissionWeight:N,defaultRayMarchWorldReach:O},Symbol.toStringTag,{value:"Module"}));export{H as G,q as a,Q as b,_ as c,U as d,L as e,k as f,V as g,N as h,O as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as
|
|
2
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as c}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{ditherNoise as p}from"../views/3d/webgl-engine/shaders/ditherNoise.glsl.js";import{FloatBlendScaleConfiguration as d}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{NoParameters as h}from"../views/webgl/NoParameters.js";import{ShaderBuilder as f}from"../views/webgl/ShaderBuilder.js";const g=4,b=.2,S=2.5;class w extends h{constructor(){super(...arguments),this.blurSize=e()}}function v(){const e=new f,d=e.fragment;e.include(l),e.include(t),e.include(i);const h=(g+3)/2,w=1/(2*h*h);d.include(o),d.include(p,W),d.include(c);const v=5e4;d.uniforms.add(new a("hasEmission",e=>null!=e.reprojection.lastFrameEmission),new m("depthMap",e=>e.depthTexture),new m("normalMap",e=>e.normalTexture),new u("globalIlluminationTexture",e=>e.texture),new u("globalIlluminationWeightTexture",e=>e.weightTexture),new n("blurSize",e=>e.blurSize),new s("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new s("projScale",(e,l)=>{const o=l.camera.distance;return o>v?Math.max(0,e.projScale-(o-v)):e.projScale}));const I=.1,x=400,O=.03,j=.08,D=1.5,G=1/32768,B=.85;return d.code.add(r`
|
|
3
3
|
void accumulateBlurSample(
|
|
4
4
|
vec2 sampleUv,
|
|
5
5
|
float sampleOffset,
|
|
@@ -22,10 +22,10 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
22
22
|
float normalSimilarityWeight = globalIlluminationNormalSimilarityWeight(sampleNormal, centerNormal);
|
|
23
23
|
float depthNormalCorrection = globalIlluminationDepthNormalCorrection(sampleNormal);
|
|
24
24
|
vec3 emission = sampleGlobalIllumination.rgb;
|
|
25
|
-
float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${r.float(
|
|
25
|
+
float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${r.float(x)} : 1.0;
|
|
26
26
|
|
|
27
27
|
float emissionWeight = exp(
|
|
28
|
-
-sampleOffset * sampleOffset * ${r.float(
|
|
28
|
+
-sampleOffset * sampleOffset * ${r.float(w)} * ${r.float(I)} * emissionSpatialWeightMultiplier
|
|
29
29
|
- depthDelta * depthDelta * depthSharpness * depthNormalCorrection
|
|
30
30
|
);
|
|
31
31
|
emissionWeight *= normalSimilarityWeight;
|
|
@@ -36,9 +36,9 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${r.float(
|
|
40
|
-
? ${r.float(
|
|
41
|
-
: ${r.float(
|
|
39
|
+
float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${r.float(O)}
|
|
40
|
+
? ${r.float(j)}
|
|
41
|
+
: ${r.float(D)};
|
|
42
42
|
float occlusionWeight = exp(-sampleOffset * sampleOffset * occlusionSpatialKernelScale - depthDelta * depthDelta * depthSharpness);
|
|
43
43
|
occlusionWeight *= normalSimilarityWeight;
|
|
44
44
|
occlusionWeightSum += occlusionWeight;
|
|
@@ -50,8 +50,9 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
50
50
|
|
|
51
51
|
vec4 centerGlobalIllumination = texture(globalIlluminationTexture, uv);
|
|
52
52
|
float centerOcclusionBlendWeight = texture(globalIlluminationWeightTexture, uv).r;
|
|
53
|
+
float centerColorBlendWeight = texture(globalIlluminationWeightTexture, uv).g;
|
|
53
54
|
bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
|
|
54
|
-
bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${r.float(
|
|
55
|
+
bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${r.float(O)};
|
|
55
56
|
bool shouldSkipLowQualityBlur = !hasEmission && shouldReuseCenterOcclusion;
|
|
56
57
|
if (shouldSkipLowQualityBlur) {
|
|
57
58
|
fragColor = vec4(
|
|
@@ -67,9 +68,16 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
67
68
|
float occlusionWeightSum = 0.0;
|
|
68
69
|
|
|
69
70
|
float depthSharpness = globalIlluminationDepthSharpness(projScale, centerDepth);
|
|
71
|
+
float lowQualityBlurScale = hasEmission
|
|
72
|
+
? mix(
|
|
73
|
+
1.0,
|
|
74
|
+
${r.float(S)},
|
|
75
|
+
smoothstep(0.0, ${r.float(b)}, centerColorBlendWeight)
|
|
76
|
+
)
|
|
77
|
+
: 1.0;
|
|
70
78
|
for (int sampleOffset = -${r.int(g)}; sampleOffset <= ${r.int(g)}; ++sampleOffset) {
|
|
71
79
|
float sampleOffsetFloat = float(sampleOffset);
|
|
72
|
-
vec2 sampleUv = uv + sampleOffsetFloat * blurSize;
|
|
80
|
+
vec2 sampleUv = uv + sampleOffsetFloat * blurSize * lowQualityBlurScale;
|
|
73
81
|
accumulateBlurSample(
|
|
74
82
|
sampleUv,
|
|
75
83
|
sampleOffsetFloat,
|
|
@@ -89,8 +97,8 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
89
97
|
vec3 blurredEmission = (emissionSum / emissionWeightSum).rgb;
|
|
90
98
|
|
|
91
99
|
// Dither the blurred color to reduce quantization banding and wrong color accumulation.
|
|
92
|
-
float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${r.float(
|
|
93
|
-
blurredEmission += isScaledGlobalIllumination ? ${r.float(
|
|
100
|
+
float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${r.float(G)};
|
|
101
|
+
blurredEmission += isScaledGlobalIllumination ? ${r.float(B)} * dither : dither;
|
|
94
102
|
|
|
95
103
|
fragColor = vec4(quantizeGlobalIlluminationColor(blurredEmission), occlusion);
|
|
96
|
-
`),e}const
|
|
104
|
+
`),e}const W=new d;W.useFloatBlend=!1;const I=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:w,build:v},Symbol.toStringTag,{value:"Module"}));export{w as G,I as a,v as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as h}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";const
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as h}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";const c=5e4,g=100;class m extends u{}function p(){const u=new s,m=u.fragment;return u.include(e),u.include(r),u.include(l),m.include(t),m.include(h),m.uniforms.add(new n("depthMap",e=>e.depthTexture),new n("normalMap",e=>e.normalTexture),new o("tex",e=>e.colorTexture),new o("globalIlluminationWeightTexture",e=>e.weightTexture),new a("projScale",(e,t)=>{const l=t.camera.distance;return l>c?Math.max(0,e.projScale-(l-c)):e.projScale})),m.code.add(i`
|
|
3
3
|
float computeDepthWeight(float sampleDepth, float centerDepth, float depthSharpness) {
|
|
4
4
|
float depthDelta = abs(sampleDepth - centerDepth);
|
|
5
5
|
return exp(-0.08 - depthDelta * depthDelta * depthSharpness);
|
|
@@ -11,10 +11,10 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
11
11
|
return texelFetch(normalTexture, normalTexel, 0).xyz;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
void sampleJointBilateralUpscale(vec2 sampleUv, out vec4 upscaledColor, out
|
|
14
|
+
void sampleJointBilateralUpscale(vec2 sampleUv, out vec4 upscaledColor, out vec2 upscaledWeight) {
|
|
15
15
|
float centerDepth = linearDepthFromTexture(depthMap, sampleUv);
|
|
16
16
|
vec3 centerNormal = normalFromTexture(normalMap, sampleUv);
|
|
17
|
-
float depthSharpness = ${i.float(
|
|
17
|
+
float depthSharpness = ${i.float(g)} * globalIlluminationDepthSharpness(projScale, centerDepth, centerNormal);
|
|
18
18
|
|
|
19
19
|
vec2 lowResTextureSize = vec2(textureSize(tex, 0));
|
|
20
20
|
vec2 texelPosition = sampleUv * lowResTextureSize - 0.5;
|
|
@@ -30,10 +30,10 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
30
30
|
vec4 color10 = texture(tex, uv10);
|
|
31
31
|
vec4 color01 = texture(tex, uv01);
|
|
32
32
|
vec4 color11 = texture(tex, uv11);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
vec2 weight00 = texture(globalIlluminationWeightTexture, uv00).rg;
|
|
34
|
+
vec2 weight10 = texture(globalIlluminationWeightTexture, uv10).rg;
|
|
35
|
+
vec2 weight01 = texture(globalIlluminationWeightTexture, uv01).rg;
|
|
36
|
+
vec2 weight11 = texture(globalIlluminationWeightTexture, uv11).rg;
|
|
37
37
|
|
|
38
38
|
float depth00 = linearDepthFromTexture(depthMap, uv00);
|
|
39
39
|
float depth10 = linearDepthFromTexture(depthMap, uv10);
|
|
@@ -60,7 +60,7 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
60
60
|
// Fall back to the nearest low-resolution texel when all bilateral weights collapse.
|
|
61
61
|
vec2 nearestUv = (floor(texelPosition + 0.5) + vec2(0.5)) / lowResTextureSize;
|
|
62
62
|
upscaledColor = texture(tex, nearestUv);
|
|
63
|
-
upscaledWeight = texture(globalIlluminationWeightTexture, nearestUv).
|
|
63
|
+
upscaledWeight = texture(globalIlluminationWeightTexture, nearestUv).rg;
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -78,5 +78,5 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
78
78
|
weight11 * jointBilateralWeight11
|
|
79
79
|
) / jointBilateralWeightSum;
|
|
80
80
|
}
|
|
81
|
-
`),u.outputs.add("fragColor","vec4",0),u.outputs.add("fragWeight","
|
|
82
|
-
fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),u}const
|
|
81
|
+
`),u.outputs.add("fragColor","vec4",0),u.outputs.add("fragWeight","vec2",1),m.main.add(i`sampleJointBilateralUpscale(uv, fragColor, fragWeight);
|
|
82
|
+
fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),u}const v=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationUpscaleDrawParameters:m,build:p},Symbol.toStringTag,{value:"Module"}));export{m as G,v as a,p as b};
|
package/chunks/GlowBlur.glsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{normalize as e}from"../core/arrayUtils.js";import{gauss as r}from"../core/mathUtils.js";import{create as o,ONES as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{BooleanDrawUniform as s}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{Float2DrawUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatDrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js";import{glsl as m}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";class f extends u{constructor(){super(...arguments),this.inputScale=1,this.isHorizontal=!0,this.level=0,this.size=o()}}function w(){const e=new d,r=e.fragment;e.include(t),r.include(l);const o=
|
|
2
|
+
import{normalize as e}from"../core/arrayUtils.js";import{gauss as r}from"../core/mathUtils.js";import{create as o,ONES as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{BooleanDrawUniform as s}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{Float2DrawUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatDrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js";import{glsl as m}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";class f extends u{constructor(){super(...arguments),this.inputScale=1,this.isHorizontal=!0,this.level=0,this.size=o()}}function w(){const e=new d,r=e.fragment;e.include(t),r.include(l);const o=5,u=2;return r.uniforms.add(new c("colorTexture",e=>e.input),new s("isHorizontal",({isHorizontal:e})=>e),new n("level",({isHorizontal:e,level:r})=>e?Math.max(0,r-1):0),new n("inputScale",({inputScale:e})=>e),new a("size",({isHorizontal:e,size:r})=>e?i:r)).constants.add("sampleCount","int",o).code.add(m`
|
|
3
3
|
${v(o,u)}
|
|
4
4
|
|
|
5
5
|
vec3 blurUniformSamples() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{DistanceFalloffPassParameters as o,getDistanceFalloff as r}from"../views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js";import{floatBlendScale as n}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ScreenSpacePassAtmosphere as m}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ToneMapping as d}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class g extends o{constructor(){super(...arguments),this.mipmapLevels=1,this.boost=1,this.scattering=1e-4}}function c(o){const g=new p,c=g.fragment;g.include(m,{needUVs:!0,needEyeDirection:!0}),c.include(s),c.include(r),c.include(e),c.include(d),c.include(n,o),g.outputs.add("fragEmission","vec3",1);const f=1.5;return c.uniforms.add(new l("emissionTexture",({emission:e})=>e?.attachment),new a("depthTexture",({mainDepth:e})=>e),new i("scattering",({scattering:e})=>e),new i("boost",({boost:e})=>e),new i("levels",({mipmapLevels:e})=>e),new l("mipmapTexture",({mipmapTexture:e})=>e?.getTexture())).constants.add("sigmaSq","float",f).constants.add("weightEpsilon","float",.
|
|
2
|
+
import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{DistanceFalloffPassParameters as o,getDistanceFalloff as r}from"../views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js";import{floatBlendScale as n}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ScreenSpacePassAtmosphere as m}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ToneMapping as d}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class g extends o{constructor(){super(...arguments),this.mipmapLevels=1,this.boost=1,this.scattering=1e-4}}function c(o){const g=new p,c=g.fragment;g.include(m,{needUVs:!0,needEyeDirection:!0}),c.include(s),c.include(r),c.include(e),c.include(d),c.include(n,o),g.outputs.add("fragEmission","vec3",1);const f=1.5;return c.uniforms.add(new l("emissionTexture",({emission:e})=>e?.attachment),new a("depthTexture",({mainDepth:e})=>e),new i("scattering",({scattering:e})=>e),new i("boost",({boost:e})=>e),new i("levels",({mipmapLevels:e})=>e),new l("mipmapTexture",({mipmapTexture:e})=>e?.getTexture())).constants.add("sigmaSq","float",f).constants.add("weightEpsilon","float",.005).constants.add("gaussCoefficient","float",1/Math.sqrt(2*Math.PI*f)).code.add(t`vec3 readEmission(float level) {
|
|
3
3
|
return (level < 1.0 ?
|
|
4
4
|
texture(emissionTexture, uv).rgb * floatBlendInputScale * (1.0 - level) +
|
|
5
5
|
textureLod(mipmapTexture, uv, 0.0).rgb * level * 0.5 :
|
package/chunks/Stars.glsl.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{copy as e,multiply as
|
|
3
|
-
vcolor = color
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
float
|
|
7
|
-
float
|
|
8
|
-
|
|
9
|
-
float intensity = alpha * alpha * alpha;
|
|
10
|
-
if (vsize < 3.0) {
|
|
11
|
-
intensity *= 0.5;
|
|
12
|
-
}
|
|
13
|
-
fragColor = vec4(vcolor.xyz, intensity);`),e}function c(a,r){const i=24e-8;return e(d,r.camera.projectionMatrix),d[10]=i-1,d[11]=-1,d[14]=(i-2)*r.camera.near,o(d,d,r.camera.viewMatrix),o(d,d,a.modelMatrix)}const d=a(),m=Object.freeze(Object.defineProperty({__proto__:null,build:n},Symbol.toStringTag,{value:"Module"}));export{m as S,n as b};
|
|
2
|
+
import{copy as e,multiply as a}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{Float4BindUniform as r}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{FloatBindUniform as o}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";function l(){const e=new s,{vertex:a,fragment:i,attributes:l,varyings:c}=e;return l.add("position","vec3"),l.add("color","vec4"),l.add("size","float"),c.add("vcolor","vec4"),c.add("vsize","float"),a.uniforms.add(new n("transform",(e,a)=>d(e,a)),new r("viewport",e=>e.camera.fullViewport),new o("pixelRatio",e=>e.camera.pixelRatio)),i.uniforms.add(new o("pixelRatio",e=>e.camera.pixelRatio)),i.constants.add("starFootprintRadiusScale","float",.7),a.main.add(t`gl_Position = transform * vec4(position, 0);
|
|
3
|
+
vcolor = color;`),a.main.add(t`vsize = size * 5.0;`),a.main.add(t`gl_PointSize = max(vsize * pixelRatio, 1.0);`),i.main.add(t`float rasterizedPointSizeScreen = max(vsize, 1.0 / pixelRatio);
|
|
4
|
+
vec2 pointOffsetScreen = (gl_PointCoord - vec2(0.5)) * rasterizedPointSizeScreen;`),i.main.add(t`float radiusScreen = max(starFootprintRadiusScale * vsize, 1e-4);
|
|
5
|
+
float distanceFromCenterScreen = clamp(length(pointOffsetScreen), 0.0, radiusScreen);
|
|
6
|
+
float alpha = clamp((radiusScreen - distanceFromCenterScreen) / radiusScreen, 0.0, 1.0);`),i.main.add(t`float subpixelCoverage = min(vsize * vsize, 1.0);
|
|
7
|
+
float intensity = alpha * alpha * alpha * subpixelCoverage;
|
|
8
|
+
fragColor = vec4(vcolor.xyz, intensity);`),e}function d(i,r){const o=24e-8;return e(c,r.camera.projectionMatrix),c[10]=o-1,c[11]=-1,c[14]=(o-2)*r.camera.near,a(c,c,r.camera.viewMatrix),a(c,c,i.modelMatrix)}const c=i(),m=Object.freeze(Object.defineProperty({__proto__:null,build:l},Symbol.toStringTag,{value:"Module"}));export{m as S,l as b};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.52";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/types.d.ts
CHANGED
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.52",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.52",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://js.arcgis.com",
|
|
6
6
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@amcharts/amcharts5": "~5.19.1",
|
|
23
|
-
"@arcgis/toolkit": "^5.2.0-next.
|
|
23
|
+
"@arcgis/toolkit": "^5.2.0-next.47",
|
|
24
24
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
25
25
|
"@esri/calcite-components": "^5.1.1",
|
|
26
26
|
"@vaadin/grid": "~25.2.4",
|
|
27
|
-
"@zip.js/zip.js": "~2.8.
|
|
27
|
+
"@zip.js/zip.js": "~2.8.31",
|
|
28
28
|
"luxon": "~3.7.2",
|
|
29
29
|
"marked": "~18.0.6",
|
|
30
30
|
"tslib": "^2.8.1"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type NetworkElement from "./NetworkElement.js";
|
|
2
2
|
import type { JSONSupport } from "../../../core/JSONSupport.js";
|
|
3
|
-
import type { DirtyStatusFilterType, ErrorStatusFilterType } from "../../../networks/support/typeUtils.js";
|
|
3
|
+
import type { TraverseType, DirtyStatusFilterType, ErrorStatusFilterType } from "../../../networks/support/typeUtils.js";
|
|
4
4
|
|
|
5
|
-
export interface TraverseAssociationsParametersProperties extends Partial<Pick<TraverseAssociationsParameters, "direction" | "dirtyStatusFilter" | "elements" | "errorStatusFilter" | "gdbVersion" | "maxDepth" | "stopAtFirstSpatial">> {
|
|
5
|
+
export interface TraverseAssociationsParametersProperties extends Partial<Pick<TraverseAssociationsParameters, "direction" | "dirtyStatusFilter" | "elements" | "errorStatusFilter" | "gdbVersion" | "maxDepth" | "stopAtFirstSpatial" | "type">> {
|
|
6
6
|
/**
|
|
7
7
|
* The date/timestamp (in UTC) to execute the function. This could be used to run the function in a moment in the past or in long transaction mode (undo/redo). Applicable to branch versioned datasets only.
|
|
8
8
|
*
|
|
@@ -12,7 +12,10 @@ export interface TraverseAssociationsParametersProperties extends Partial<Pick<T
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* TraverseAssociationsParameters describes the optional parameters to execute the
|
|
15
|
+
* TraverseAssociationsParameters describes the optional parameters to execute the
|
|
16
|
+
* [traverseAssociations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/traverseAssociations/) function, which returns a list of
|
|
17
|
+
* [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) and
|
|
18
|
+
* [objects](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraverseAssociationsResult/#objects) filtered by the parameters set.
|
|
16
19
|
*
|
|
17
20
|
* @since 5.2
|
|
18
21
|
* @see [Association](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/)
|
|
@@ -32,7 +35,7 @@ export interface TraverseAssociationsParametersProperties extends Partial<Pick<T
|
|
|
32
35
|
* });
|
|
33
36
|
*
|
|
34
37
|
* // Traverse associations
|
|
35
|
-
* const response = await traverseAssociations(networkServiceUrl,
|
|
38
|
+
* const response = await traverseAssociations(networkServiceUrl, traverseAssociationsParameters);
|
|
36
39
|
*
|
|
37
40
|
* // Print out the first association and first object
|
|
38
41
|
* console.log(response.associations[0]);
|
|
@@ -66,4 +69,23 @@ export default class TraverseAssociationsParameters extends JSONSupport {
|
|
|
66
69
|
* The traversal will stop at the feature and will not traverse to the next nonspatial object.
|
|
67
70
|
*/
|
|
68
71
|
accessor stopAtFirstSpatial: boolean | null | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The type of traversal to perform.
|
|
74
|
+
*
|
|
75
|
+
* To create a custom traversal the `direction`, `dirtyStatusFilter`, `errorStatusFilter`, `stopAtFirstSpatial`, and `maxDepth` parameters can be used.
|
|
76
|
+
* When a traversal type is specified using the type parameter other than the default "unspecified", these parameters are ignored.
|
|
77
|
+
*
|
|
78
|
+
* **Possible Values**
|
|
79
|
+
*
|
|
80
|
+
* Value | Description |
|
|
81
|
+
* ----- | ----------- |
|
|
82
|
+
* unspecified | A custom traversal will be performed according to these parameters: `direction`, `dirtyStatusFilter`, `errorStatusFilter`, `stopAtFirstSpatial`, and `maxDepth`.
|
|
83
|
+
* dirty-area-expansion | Returns associations and objects that have been modified and are marked as dirty. Completes a downward traversal, then an ascending traversal, with an exit filter on the first spatial feature in each direction.
|
|
84
|
+
* first-containers | Completes an ascending traversal on containment associations, with an exit filter on the first spatial feature.
|
|
85
|
+
* spatial-parents | Completes an ascending traversal on all association types, with an exit filter on the first spatial feature.
|
|
86
|
+
* top-containers | Completes an ascending traversal to return associations and objects with no exit filter.
|
|
87
|
+
* errors-not-modified | Completes a downward traversal to return associations in error, with an exit filter on the first spatial feature.
|
|
88
|
+
* modified-objects | Completes a downward traversal to return associations that are dirty, with an exit filter on the first spatial feature.
|
|
89
|
+
*/
|
|
90
|
+
accessor type: TraverseType[] | null | undefined;
|
|
69
91
|
}
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const a="20260718",d="e09a23db77924db68a70f6d757200dc0a0a04177";export{a as buildDate,d as commitHash};
|
package/third-party-notices.txt
CHANGED
|
@@ -1271,33 +1271,6 @@ limitations under the License.
|
|
|
1271
1271
|
This code was forked from https://github.com/notmasteryet/jpgjs. The original
|
|
1272
1272
|
version was created by github user notmasteryet
|
|
1273
1273
|
|
|
1274
|
-
--------------------------------------------------------------------------------
|
|
1275
|
-
|
|
1276
|
-
esri/layers/rasterFormats/Png.js
|
|
1277
|
-
|
|
1278
|
-
Extracted from png.js project
|
|
1279
|
-
png.js: A (animated) PNG decoder in JavaScript for the HTML5 canvas element and Node.js.
|
|
1280
|
-
https://github.com/devongovett/png.js
|
|
1281
|
-
Version 0.1.1, April 10, 2015
|
|
1282
|
-
|
|
1283
|
-
MIT LICENSE
|
|
1284
|
-
Copyright (c) 2011 Devon Govett
|
|
1285
|
-
|
|
1286
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
1287
|
-
software and associated documentation files (the "Software"), to deal in the Software
|
|
1288
|
-
without restriction, including without limitation the rights to use, copy, modify, merge,
|
|
1289
|
-
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
|
1290
|
-
to whom the Software is furnished to do so, subject to the following conditions:
|
|
1291
|
-
|
|
1292
|
-
The above copyright notice and this permission notice shall be included in all copies or
|
|
1293
|
-
substantial portions of the Software.
|
|
1294
|
-
|
|
1295
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
|
1296
|
-
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
1297
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
1298
|
-
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1299
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1300
|
-
|
|
1301
1274
|
--------------------------------------------------------------------------------------
|
|
1302
1275
|
|
|
1303
1276
|
esri/libs/sanitizer/Sanitizer.js
|
|
@@ -1417,45 +1390,6 @@ You may obtain a copy of the License at
|
|
|
1417
1390
|
|
|
1418
1391
|
-------------------------------------------------------------------------------
|
|
1419
1392
|
|
|
1420
|
-
esri/layers/rasterFormats/Zlib.mjs
|
|
1421
|
-
|
|
1422
|
-
Extracted from png.js project
|
|
1423
|
-
png.js: A (animated) PNG decoder in JavaScript for the HTML5 canvas element and Node.js.
|
|
1424
|
-
https://github.com/devongovett/png.js
|
|
1425
|
-
Version 0.1.1, April 10, 2015
|
|
1426
|
-
|
|
1427
|
-
Github user devongovett extracted zlib.js from pdf.js
|
|
1428
|
-
https://github.com/andreasgal/pdf.js
|
|
1429
|
-
|
|
1430
|
-
Copyright (c) 2011 Mozilla Foundation
|
|
1431
|
-
|
|
1432
|
-
Contributors: Andreas Gal <gal@mozilla.com>
|
|
1433
|
-
Chris G Jones <cjones@mozilla.com>
|
|
1434
|
-
Shaon Barman <shaon.barman@gmail.com>
|
|
1435
|
-
Vivien Nicolas <21@vingtetun.org>
|
|
1436
|
-
Justin D'Arcangelo <justindarc@gmail.com>
|
|
1437
|
-
Yury Delendik
|
|
1438
|
-
|
|
1439
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
1440
|
-
copy of this software and associated documentation files (the "Software"),
|
|
1441
|
-
to deal in the Software without restriction, including without limitation
|
|
1442
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
1443
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
1444
|
-
Software is furnished to do so, subject to the following conditions:
|
|
1445
|
-
|
|
1446
|
-
The above copyright notice and this permission notice shall be included in
|
|
1447
|
-
all copies or substantial portions of the Software.
|
|
1448
|
-
|
|
1449
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1450
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1451
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
1452
|
-
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1453
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
1454
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
1455
|
-
DEALINGS IN THE SOFTWARE.
|
|
1456
|
-
|
|
1457
|
-
-------------------------------------------------------------------------------
|
|
1458
|
-
|
|
1459
1393
|
esri/views/3d/webgl-engine/lib/SmaaRenderPass.js
|
|
1460
1394
|
|
|
1461
1395
|
Excerpts from three.js (SMAA)
|