@arcgis/core 4.31.0-next.20240708 → 4.31.0-next.20240709
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/{0975e54c50383375cc09.js → 14cf7411e8318a1bccb9.js} +1 -1
- package/assets/esri/core/workers/chunks/{71852b8437ec66b9ef06.js → 2123ab24163a532ebc8d.js} +1 -1
- package/assets/esri/core/workers/chunks/{c91b3800cf3891bf2d59.js → 252ff37bf5e12dae0b18.js} +1 -1
- package/assets/esri/core/workers/chunks/2799007b5f3f4a2e364c.js +51 -0
- package/assets/esri/core/workers/chunks/{ff5e6d823d512f87a527.js → 2dddb8a989b9c96572fe.js} +1 -1
- package/assets/esri/core/workers/chunks/3375de864347a847393d.js +1042 -0
- package/assets/esri/core/workers/chunks/543f9db420c99d429637.js +1 -0
- package/assets/esri/core/workers/chunks/{812e18c65aa6e398c338.js → 5b6c89dc41067d81c952.js} +1 -1
- package/assets/esri/core/workers/chunks/{5089a12084a8a8fb93d8.js → 61e5179fb49866241128.js} +1 -1
- package/assets/esri/core/workers/chunks/632e3ba2b8a881df29a0.js +1 -0
- package/assets/esri/core/workers/chunks/{1cc4a89c96a36d6b3d52.js → 7767559d56d16b644655.js} +1 -1
- package/assets/esri/core/workers/chunks/{43e83f4d827f59ff556a.js → 8087288f00dfdcc479b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5fbe1c95e49093e5af4.js → 8cce4b218568638e6e64.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7e2a97cb7bcd153bcef.js → 8e326def543268f8a08e.js} +1 -1
- package/assets/esri/core/workers/chunks/92cb45b18e151db007dc.js +1 -0
- package/assets/esri/core/workers/chunks/b2e8cc76381077b78d4c.js +1 -0
- package/assets/esri/core/workers/chunks/b6a8132708afcd988fa9.js +1 -0
- package/assets/esri/core/workers/chunks/{b4d850e82a8ae902d684.js → c44cc686774ff53c0a94.js} +1 -1
- package/assets/esri/core/workers/chunks/c52701477405c1fb2072.js +1 -0
- package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js → cfc2a1858a8bbb284979.js} +2 -2
- package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js.LICENSE.txt → cfc2a1858a8bbb284979.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d9863289c69d2550cd49.js +1 -0
- package/assets/esri/core/workers/chunks/e1f4df3a5b0b31521b3c.js +1 -0
- package/assets/esri/core/workers/chunks/{61505947371cebab9cbe.js → fdebfe55cd097714ec11.js} +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -18
- 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/AtmosphereCompositing.glsl.js +6 -9
- package/chunks/BlendLayers.glsl.js +1 -7
- package/chunks/BlendWeights.glsl.js +45 -51
- package/chunks/Blur.glsl.js +1 -3
- package/chunks/ChapmanAtmosphere.glsl.js +3 -8
- package/chunks/CheckerBoard.glsl.js +3 -9
- package/chunks/Clouds.glsl.js +21 -10
- package/chunks/CloudsComposition.glsl.js +3 -7
- package/chunks/ColorMaterial.glsl.js +3 -9
- package/chunks/ComponentShader.glsl.js +35 -50
- package/chunks/Compositing.glsl.js +5 -7
- package/chunks/DefaultMaterial.glsl.js +68 -73
- package/chunks/EdgeDetect.glsl.js +5 -10
- package/chunks/EdgeShader.glsl.js +37 -60
- package/chunks/Fog.glsl.js +4 -9
- package/chunks/HUDCompositing.glsl.js +1 -3
- package/chunks/HUDMaterial.glsl.js +8 -14
- package/chunks/Heatmap.glsl.js +4 -7
- package/chunks/HeatmapDensity.glsl.js +5 -11
- package/chunks/HighlightApply.glsl.js +133 -152
- package/chunks/HighlightDownsample.glsl.js +29 -32
- package/chunks/ImageMaterial.glsl.js +11 -21
- package/chunks/LaserlinePath.glsl.js +4 -9
- package/chunks/LineCallout.glsl.js +91 -108
- package/chunks/LineMarker.glsl.js +2 -8
- package/chunks/Magnifier.glsl.js +4 -9
- package/chunks/MeasurementArrow.glsl.js +9 -15
- package/chunks/NativeLine.glsl.js +8 -12
- package/chunks/NoiseTextureAtlas.glsl.js +89 -86
- package/chunks/OITCompositing.glsl.js +2 -3
- package/chunks/OverlayCompositing.glsl.js +2 -4
- package/chunks/Path.glsl.js +31 -55
- package/chunks/Pattern.glsl.js +16 -20
- package/chunks/PointRenderer.glsl.js +39 -48
- package/chunks/Precipitation.glsl.js +15 -27
- package/chunks/RasterColorizer.glsl.js +25 -33
- package/chunks/RealisticTree.glsl.js +53 -65
- package/chunks/SSAO.glsl.js +7 -10
- package/chunks/SSAOBlur.glsl.js +10 -14
- package/chunks/ShadedColorMaterial.glsl.js +12 -15
- package/chunks/ShadowCastAccumulate.glsl.js +2 -4
- package/chunks/ShadowCastVisualize.glsl.js +12 -19
- package/chunks/ShadowHighlight.glsl.js +46 -50
- package/chunks/SimpleAtmosphere.glsl.js +4 -13
- package/chunks/SlicePlaneMaterial.glsl.js +3 -7
- package/chunks/Stars.glsl.js +3 -7
- package/chunks/Terrain.glsl.js +20 -61
- package/chunks/TextureOnly.glsl.js +2 -4
- package/chunks/Viewshed.glsl.js +20 -38
- package/chunks/WaterSurface.glsl.js +34 -60
- package/core/workers/registry.js +1 -1
- package/interfaces.d.ts +34 -4
- package/layers/WCSLayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +5 -0
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +5 -0
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +5 -0
- package/views/3d/layers/graphics/pipeline/PBFPointFeaturesView.js +5 -0
- package/views/3d/layers/graphics/pipeline/TestSymbol.js +5 -0
- package/views/3d/layers/graphics/pipeline/Tile.js +5 -0
- package/views/3d/layers/graphics/pipeline/Tile3DFetcher.js +5 -0
- package/views/3d/layers/graphics/pipeline/Tile3DProcessor.js +5 -0
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/projectExtentUtils.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +3 -5
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +29 -59
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/views/webgl/heatmapTextureUtils.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/0cb2eb96ffb1dbed00eb.js +0 -1
- package/assets/esri/core/workers/chunks/0d6ed27fc9948f4ea061.js +0 -1
- package/assets/esri/core/workers/chunks/225b947ba4b2fcfd5630.js +0 -1
- package/assets/esri/core/workers/chunks/7c7c3068da3bf7467685.js +0 -1
- package/assets/esri/core/workers/chunks/85e5cdd723f68dec8c25.js +0 -1
- package/assets/esri/core/workers/chunks/aed0db145187d9eb52f2.js +0 -51
- package/assets/esri/core/workers/chunks/cf9a32a03b3d3b66effb.js +0 -1
- package/assets/esri/core/workers/chunks/e840e54455eb500b501d.js +0 -1098
- package/assets/esri/core/workers/chunks/fec53ce15ae52f8cb802.js +0 -1
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{alphaCutoff as e}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{Float2PassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{Integer2PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Integer2PassUniform.js";import{IntegerPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as r}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{b as c,o as d}from"./HighlightDownsample.glsl.js";function u(){const u=new r,{vertex:f,fragment:s}=u
|
|
6
|
-
int vid = gl_VertexID & 3;
|
|
5
|
+
import{alphaCutoff as e}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{Float2PassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{Integer2PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Integer2PassUniform.js";import{IntegerPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as r}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{b as c,o as d}from"./HighlightDownsample.glsl.js";function u(){const u=new r,{vertex:f,fragment:s}=u;return f.uniforms.add(new a("coverageTex",(e=>e.coverageTexture)),new o("coverageRounding",(e=>e.coverageRounding)),new t("highlightRenderCellCount",(e=>[e.verticalCellCount+1,e.horizontalCellCount+1]))),u.varyings.add("uv","vec2"),u.varyings.add("uv2","vec2"),f.main.add(n`int vid = gl_VertexID & 3;
|
|
7
6
|
int cellIndex = gl_InstanceID;
|
|
8
7
|
int renderCellCountHorizontal = highlightRenderCellCount[0];
|
|
9
8
|
int renderCellCountVertical = highlightRenderCellCount[1];
|
|
@@ -24,175 +23,157 @@ float posY = uv0.y * 2.0 + ySign * iV - 1.0;
|
|
|
24
23
|
vec2 pos = vec2(posX,posY);
|
|
25
24
|
gl_Position = vec4(pos, 0.0, 1.0);
|
|
26
25
|
uv = pos * 0.5 + vec2(0.5);
|
|
27
|
-
uv2 = uv0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
float getWeight(int pixelDistance) {
|
|
82
|
-
float scaledDistance = float(pixelDistance) * pixelSampleScale / pixelRatio;
|
|
83
|
-
float d0f = floor(scaledDistance);
|
|
84
|
-
int d0 = int(d0f);
|
|
85
|
-
if (d0 >= 8){
|
|
86
|
-
return 0.0;
|
|
87
|
-
}
|
|
88
|
-
float w0 = pascal17[d0];
|
|
89
|
-
float w1 = d0 > 8 ? 0.0 : pascal17[d0+1];
|
|
90
|
-
float f = d0f - d0f;
|
|
91
|
-
return mix(w0, w1, f);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
void main() {
|
|
95
|
-
vec2 highlightTextureSize = vec2(textureSize(highlightTexture,0));
|
|
26
|
+
uv2 = uv0;`),s.uniforms.add(new a("highlightTexture",(e=>e.highlightTexture)),new a("coverageTex",(e=>e.coverageTexture)),new o("coverageRounding",(e=>e.coverageRounding)),new a("highlightOptionsTexture",(e=>e.highlightOptionsTexture)),new l("pixelRatio",(e=>e.pixelRatio)),new l("occludedIntensityFactor",(e=>e.occludedFactor)),new i("maxHighlightLevel",(e=>e.maxHighlightLevel))),s.constants.add("inner","float",c/d),s.code.add(n`const float pascal9[5] = float[5](70.0, 56.0, 28.0, 8.0, 1.0);
|
|
27
|
+
const float denom9 = 256.0;
|
|
28
|
+
const float pascal11[6] = float[6](252.0, 210.0, 120.0, 45.0, 10.0, 1.0);
|
|
29
|
+
const float denom11 = 1024.0;
|
|
30
|
+
const float pascal13[7] = float[7](924.0, 792.0, 495.0, 220.0, 66.0, 12.0, 1.0);
|
|
31
|
+
const float denom13 = 4096.0;
|
|
32
|
+
const float pascal15[8] = float[8](3432.0, 3003.0, 2002.0, 1001.0, 364.0, 91.0, 14.0, 1.0);
|
|
33
|
+
const float denom15 = 16384.0;
|
|
34
|
+
const float pascal17[9] = float[9](12870.0, 11440.0, 8008.0, 4368.0, 1820.0, 560.0, 120.0, 16.0, 1.0);
|
|
35
|
+
const float denom17 = 65536.0;
|
|
36
|
+
const float pixelSampleScale = 1.0;
|
|
37
|
+
float colorWeight[16] = float[16](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
|
38
|
+
float colorOcclusion[16] = float[16](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
|
|
39
|
+
void applyTexel(vec4 texel, float pf) {
|
|
40
|
+
if (texel != vec4(0.0)){
|
|
41
|
+
for (int colorIndex = 0; colorIndex <= maxHighlightLevel; ++colorIndex){
|
|
42
|
+
int v = int(texel[colorIndex >> 2] * 255.0);
|
|
43
|
+
if (v != 0){
|
|
44
|
+
int vj = (v >> ((colorIndex&3)<<1)) & 3;
|
|
45
|
+
if ((vj & 1) == 1){
|
|
46
|
+
colorWeight[colorIndex] += pf;
|
|
47
|
+
if ((vj & 2) == 2){
|
|
48
|
+
colorOcclusion[colorIndex] += pf;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
void readAndApplyTexel(ivec2 iuv, int du, int dv, float pf) {
|
|
56
|
+
vec4 texel = texelFetch(highlightTexture, iuv + ivec2(du, dv), 0);
|
|
57
|
+
applyTexel(texel,pf);
|
|
58
|
+
}
|
|
59
|
+
void readAndApply2TexelsU(ivec2 iuv, int du, int dv, float pf) {
|
|
60
|
+
vec4 texel1 = texelFetch(highlightTexture, iuv + ivec2(-du, dv), 0);
|
|
61
|
+
applyTexel(texel1,pf);
|
|
62
|
+
vec4 texel2 = texelFetch(highlightTexture, iuv + ivec2(+du, dv), 0);
|
|
63
|
+
applyTexel(texel2,pf);
|
|
64
|
+
}
|
|
65
|
+
float getWeight(int pixelDistance) {
|
|
66
|
+
float scaledDistance = float(pixelDistance) * pixelSampleScale / pixelRatio;
|
|
67
|
+
float d0f = floor(scaledDistance);
|
|
68
|
+
int d0 = int(d0f);
|
|
69
|
+
if (d0 >= 8){
|
|
70
|
+
return 0.0;
|
|
71
|
+
}
|
|
72
|
+
float w0 = pascal17[d0];
|
|
73
|
+
float w1 = d0 > 8 ? 0.0 : pascal17[d0+1];
|
|
74
|
+
float f = d0f - d0f;
|
|
75
|
+
return mix(w0, w1, f);
|
|
76
|
+
}`),s.main.add(n`
|
|
77
|
+
vec2 highlightTextureSize = vec2(textureSize(highlightTexture,0));
|
|
96
78
|
|
|
97
|
-
|
|
98
|
-
|
|
79
|
+
ivec2 iuv = ivec2(uv * highlightTextureSize);
|
|
80
|
+
vec4 center = texelFetch(highlightTexture, iuv, 0);
|
|
99
81
|
|
|
100
|
-
|
|
82
|
+
vec4 accumulatedColor = vec4(0.0);
|
|
101
83
|
|
|
102
|
-
|
|
84
|
+
vec4 cov = texture(coverageTex, uv2 * coverageRounding);
|
|
103
85
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
bool potentialOutline = cov.g < 1.0;
|
|
87
|
+
if (potentialOutline) {
|
|
88
|
+
// Calculate outline share
|
|
107
89
|
|
|
108
|
-
|
|
90
|
+
int maxPixelDistance = clamp(int(8.0 * pixelRatio / pixelSampleScale),2,16);
|
|
109
91
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
92
|
+
// Calculate denominator for the filter so that the weights sum up to 1.0
|
|
93
|
+
int fs = maxPixelDistance;
|
|
94
|
+
float denom = 0.0;
|
|
95
|
+
for(int y = 0; y <= fs; y += 1) {
|
|
96
|
+
float w = getWeight(y);
|
|
97
|
+
denom += w * (y == 0 ? 1.0 : 2.0);
|
|
98
|
+
}
|
|
117
99
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
100
|
+
for(int y = 0; y <= fs; y += 1) {
|
|
101
|
+
float yFactor = getWeight(y);
|
|
102
|
+
{
|
|
103
|
+
float xFactor = getWeight(0);
|
|
104
|
+
float pf = xFactor * yFactor / (denom*denom);
|
|
105
|
+
if (pf > 0.0) {
|
|
106
|
+
readAndApplyTexel(iuv, 0, +y, pf);
|
|
107
|
+
if (y!=0){
|
|
108
|
+
readAndApplyTexel(iuv, 0, -y, pf);
|
|
128
109
|
}
|
|
129
110
|
}
|
|
111
|
+
}
|
|
130
112
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
113
|
+
for(int x = 1; x <= fs; x += 1) {
|
|
114
|
+
float xFactor = getWeight(x);
|
|
115
|
+
float pf = xFactor * yFactor / (denom*denom);
|
|
116
|
+
if (pf > 0.0) {
|
|
117
|
+
readAndApply2TexelsU(iuv, x, +y, pf);
|
|
118
|
+
if (y!=0){
|
|
119
|
+
readAndApply2TexelsU(iuv, x, -y, pf);
|
|
139
120
|
}
|
|
140
121
|
}
|
|
141
122
|
}
|
|
142
|
-
} else {
|
|
143
|
-
applyTexel(center, 1.0);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
int frontColorIndex = 999;
|
|
147
|
-
int maxColorIndex = 0;
|
|
148
|
-
for (int i=0; i<maxHighlightLevel; ++i){
|
|
149
|
-
if (colorWeight[i] > 0.0){
|
|
150
|
-
frontColorIndex = min(frontColorIndex,i);
|
|
151
|
-
maxColorIndex = max(maxColorIndex,i);
|
|
152
|
-
}
|
|
153
123
|
}
|
|
124
|
+
} else {
|
|
125
|
+
applyTexel(center, 1.0);
|
|
126
|
+
}
|
|
154
127
|
|
|
155
|
-
|
|
156
|
-
|
|
128
|
+
int frontColorIndex = 999;
|
|
129
|
+
int maxColorIndex = 0;
|
|
130
|
+
for (int i=0; i<maxHighlightLevel; ++i){
|
|
131
|
+
if (colorWeight[i] > 0.0){
|
|
132
|
+
frontColorIndex = min(frontColorIndex,i);
|
|
133
|
+
maxColorIndex = max(maxColorIndex,i);
|
|
157
134
|
}
|
|
135
|
+
}
|
|
158
136
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
137
|
+
if (frontColorIndex == 999){
|
|
138
|
+
discard;
|
|
139
|
+
}
|
|
164
140
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
bool centerOccluded = centerFilled && ((vc & 2) == 2);
|
|
170
|
-
|
|
171
|
-
float curColorOcclusion = colorOcclusion[curColorIndex];
|
|
172
|
-
bool occluded = centerFilled ? centerOccluded : curColorOcclusion > 0.5 * curColorWeight;
|
|
173
|
-
|
|
174
|
-
int colorChannel = centerFilled ? 0 : 1;
|
|
175
|
-
vec4 colorBase = texelFetch(highlightOptionsTexture,ivec2(curColorIndex,colorChannel),0);
|
|
176
|
-
float occlusionFactor = occluded ? occludedIntensityFactor : 1.0;
|
|
177
|
-
float outlineFactor = centerFilled ? 1.0 : smoothstep(0.0, 0.03, curColorWeight);
|
|
178
|
-
float intensity = colorBase.a * occlusionFactor * outlineFactor;
|
|
179
|
-
|
|
180
|
-
// Compose two RGBAs to be blended to the frame buffer
|
|
181
|
-
vec3 currentColor = colorBase.rgb;
|
|
182
|
-
float a0 = accumulatedColor.a;
|
|
183
|
-
float a1 = intensity;
|
|
184
|
-
float alpha = clamp(a0 + a1 - a0 * a1,0.0,1.0);
|
|
185
|
-
if (alpha > 0.001){
|
|
186
|
-
vec3 blendedColor = ((1.0 - a1) * a0 * accumulatedColor.rgb + a1 * currentColor) / alpha;
|
|
187
|
-
accumulatedColor = vec4(blendedColor, alpha);
|
|
188
|
-
}
|
|
141
|
+
for (int curColorIndex=maxColorIndex; curColorIndex>=frontColorIndex; --curColorIndex){
|
|
142
|
+
float curColorWeight = colorWeight[curColorIndex];
|
|
143
|
+
if (curColorWeight <= 0.01){
|
|
144
|
+
continue;
|
|
189
145
|
}
|
|
190
146
|
|
|
191
|
-
|
|
192
|
-
|
|
147
|
+
int lic = (curColorIndex >> 2) & 3;
|
|
148
|
+
int llc = curColorIndex & 3;
|
|
149
|
+
int vc = (int(center[lic] * 255.0) >> (llc*2)) & 3;
|
|
150
|
+
bool centerFilled = (vc & 1) == 1;
|
|
151
|
+
bool centerOccluded = centerFilled && ((vc & 2) == 2);
|
|
152
|
+
|
|
153
|
+
float curColorOcclusion = colorOcclusion[curColorIndex];
|
|
154
|
+
bool occluded = centerFilled ? centerOccluded : curColorOcclusion > 0.5 * curColorWeight;
|
|
155
|
+
|
|
156
|
+
int colorChannel = centerFilled ? 0 : 1;
|
|
157
|
+
vec4 colorBase = texelFetch(highlightOptionsTexture,ivec2(curColorIndex,colorChannel),0);
|
|
158
|
+
float occlusionFactor = occluded ? occludedIntensityFactor : 1.0;
|
|
159
|
+
float outlineFactor = centerFilled ? 1.0 : smoothstep(0.0, 0.03, curColorWeight);
|
|
160
|
+
float intensity = colorBase.a * occlusionFactor * outlineFactor;
|
|
161
|
+
|
|
162
|
+
// Compose two RGBAs to be blended to the frame buffer
|
|
163
|
+
vec3 currentColor = colorBase.rgb;
|
|
164
|
+
float a0 = accumulatedColor.a;
|
|
165
|
+
float a1 = intensity;
|
|
166
|
+
float alpha = clamp(a0 + a1 - a0 * a1,0.0,1.0);
|
|
167
|
+
if (alpha > 0.001){
|
|
168
|
+
vec3 blendedColor = ((1.0 - a1) * a0 * accumulatedColor.rgb + a1 * currentColor) / alpha;
|
|
169
|
+
accumulatedColor = vec4(blendedColor, alpha);
|
|
193
170
|
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (accumulatedColor.a < ${n.float(e)}){
|
|
174
|
+
discard;
|
|
175
|
+
}
|
|
194
176
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}`),u}const f=Object.freeze(Object.defineProperty({__proto__:null,build:u},Symbol.toStringTag,{value:"Module"}));export{f as H,u as b};
|
|
177
|
+
// Blending equation: gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
178
|
+
// I.e., colours should not be premultiplied with alpha
|
|
179
|
+
fragColor = accumulatedColor;`),u}const f=Object.freeze(Object.defineProperty({__proto__:null,build:u},Symbol.toStringTag,{value:"Module"}));export{f as H,u as b};
|
|
@@ -2,40 +2,37 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{NoParameters as l,glsl as a}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as r}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DDrawUniform as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (value != commonValue){
|
|
25
|
-
allEqual = false;
|
|
26
|
-
}
|
|
5
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{NoParameters as l,glsl as a}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as r}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DDrawUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";class o extends l{}function i(){const l=new r,{outputs:o,fragment:i}=l;return l.include(e),i.uniforms.add(new t("textureInput",(e=>e.input))),i.constants.add("sampleArea","int",Math.ceil(n/2)),o.add("fragGrid","vec2"),i.main.add(a`
|
|
6
|
+
int cellSize = ${a.int(s)};
|
|
7
|
+
vec2 texelSize = 1.0 / vec2(textureSize(textureInput, 0));
|
|
8
|
+
vec2 offset = floor(gl_FragCoord.xy) * vec2(float(cellSize));
|
|
9
|
+
bool first = true;
|
|
10
|
+
bool allEqual = true;
|
|
11
|
+
bool hasAny = false;
|
|
12
|
+
vec4 commonValue = vec4(0.0);
|
|
13
|
+
for(int x = -sampleArea; x < cellSize + sampleArea; x += 2) {
|
|
14
|
+
for(int y = -sampleArea; y < cellSize + sampleArea; y += 2) {
|
|
15
|
+
vec2 coord = (offset + vec2(float(x), float(y))) * texelSize;
|
|
16
|
+
vec4 value = texture(textureInput, coord);
|
|
17
|
+
if (allEqual){
|
|
18
|
+
if (first){
|
|
19
|
+
first = false;
|
|
20
|
+
commonValue = value;
|
|
21
|
+
}else{
|
|
22
|
+
if (value != commonValue){
|
|
23
|
+
allEqual = false;
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
if (hasAny && !allEqual){
|
|
35
|
-
fragGrid = vec2(hasAny ? 1.0 : 0.0, allEqual ? 1.0 : 0.0);
|
|
36
|
-
return;
|
|
26
|
+
}
|
|
27
|
+
if (!hasAny){
|
|
28
|
+
if (value != vec4(0.0)){
|
|
29
|
+
hasAny = true;
|
|
37
30
|
}
|
|
38
31
|
}
|
|
32
|
+
if (hasAny && !allEqual){
|
|
33
|
+
fragGrid = vec2(hasAny ? 1.0 : 0.0, allEqual ? 1.0 : 0.0);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
39
36
|
}
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
}
|
|
38
|
+
fragGrid = vec2(hasAny ? 1.0 : 0.0, allEqual ? 1.0 : 0.0);`),l}const s=32,n=9,u=.4,c=Object.freeze(Object.defineProperty({__proto__:null,HighlightDownsampleDrawParameters:o,blurSize:u,build:i,gridCellPixelSize:s,outlineSize:n},Symbol.toStringTag,{value:"Module"}));export{o as H,c as a,u as b,i as c,s as g,n as o};
|
|
@@ -2,24 +2,14 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ShaderOutput as e}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 i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{multipassTerrainTest as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
discardBySlice(vpos);
|
|
17
|
-
${c.multipassEnabled?"terrainDepthTest(depth);":""}
|
|
18
|
-
${c.output===e.ObjectAndLayerIdColor?l`
|
|
19
|
-
fragColor = vec4(0, 0, 0, 1);
|
|
20
|
-
return;
|
|
21
|
-
`:""}
|
|
22
|
-
vec4 finalColor = texture(tex, vTexCoord) * opacity;
|
|
23
|
-
outputColorHighlightOID(finalColor, vpos);
|
|
24
|
-
}
|
|
25
|
-
`),u}const u=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{u as I,c as b};
|
|
5
|
+
import{ShaderOutput as e}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 i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{multipassTerrainTest as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{FloatPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as a}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as p}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as u}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";function v(v){const c=new a,{vertex:m,fragment:b}=c;return n(m,v),c.include(i,v),c.include(s,v),c.include(r,v),c.include(o,v),c.include(u,v),c.attributes.add(p.POSITION,"vec3"),c.attributes.add(p.UV0,"vec2"),v.perspectiveInterpolation&&c.attributes.add(p.PERSPECTIVEDIVIDE,"float"),c.varyings.add("vpos","vec3"),v.multipassEnabled&&c.varyings.add("depth","float"),m.main.add(l`
|
|
6
|
+
vpos = position;
|
|
7
|
+
${v.multipassEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
|
|
8
|
+
vTexCoord = uv0;
|
|
9
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
10
|
+
${v.perspectiveInterpolation?"gl_Position *= perspectiveDivide;":""}`),b.uniforms.add(new g("tex",(e=>e.texture)),new d("opacity",(e=>e.opacity))),c.varyings.add("vTexCoord","vec2"),b.include(t),b.main.add(l`
|
|
11
|
+
discardBySlice(vpos);
|
|
12
|
+
${v.multipassEnabled?"terrainDepthTest(depth);":""}
|
|
13
|
+
${v.output===e.ObjectAndLayerIdColor?"fragColor = vec4(0, 0, 0, 1);\n return;":""}
|
|
14
|
+
vec4 finalColor = texture(tex, vTexCoord) * opacity;
|
|
15
|
+
outputColorHighlightOID(finalColor, vpos);`),c}const c=Object.freeze(Object.defineProperty({__proto__:null,build:v},Symbol.toStringTag,{value:"Module"}));export{c as I,v as b};
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Laserline as r}from"../views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js";import{Float2PassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix4PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{ShaderBuilder as d}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{VertexAttribute as c}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function v(i){const t=new d;t.include(r,i);const{vertex:v,fragment:w}=t;return v.uniforms.add(new n("modelView",((i,{camera:o})=>e(p,o.viewMatrix,i.origin))),new n("proj",((e,{camera:i})=>i.projectionMatrix)),new s("glowWidth",((e,{camera:i})=>e.glowWidth*i.pixelRatio)),new a("pixelToNDC",((e,{camera:i})=>o(m,2/i.fullViewport[2],2/i.fullViewport[3])))),t.attributes.add(c.START,"vec3"),t.attributes.add(c.END,"vec3"),t.attributes.add(c.UP,"vec3"),t.attributes.add(c.EXTRUDE,"vec2"),t.varyings.add("uv","vec2"),t.varyings.add("vViewStart","vec3"),t.varyings.add("vViewEnd","vec3"),t.varyings.add("vViewPlane","vec4"),v.
|
|
6
|
-
vec3 pos = mix(start, end, extrude.x);
|
|
5
|
+
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Laserline as r}from"../views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js";import{Float2PassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix4PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{ShaderBuilder as d}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{VertexAttribute as c}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function v(i){const t=new d;t.include(r,i);const{vertex:v,fragment:w}=t;return v.uniforms.add(new n("modelView",((i,{camera:o})=>e(p,o.viewMatrix,i.origin))),new n("proj",((e,{camera:i})=>i.projectionMatrix)),new s("glowWidth",((e,{camera:i})=>e.glowWidth*i.pixelRatio)),new a("pixelToNDC",((e,{camera:i})=>o(m,2/i.fullViewport[2],2/i.fullViewport[3])))),t.attributes.add(c.START,"vec3"),t.attributes.add(c.END,"vec3"),t.attributes.add(c.UP,"vec3"),t.attributes.add(c.EXTRUDE,"vec2"),t.varyings.add("uv","vec2"),t.varyings.add("vViewStart","vec3"),t.varyings.add("vViewEnd","vec3"),t.varyings.add("vViewPlane","vec4"),v.main.add(l`vec3 pos = mix(start, end, extrude.x);
|
|
7
6
|
vec4 viewPos = modelView * vec4(pos, 1);
|
|
8
7
|
vec4 projPos = proj * viewPos;
|
|
9
8
|
vec2 ndcPos = projPos.xy / projPos.w;
|
|
@@ -20,8 +19,7 @@ vViewPlane = vec4(viewPlaneNormal, -dot(viewPlaneNormal, vViewStart));
|
|
|
20
19
|
float xPaddingPixels = sign(dot(viewPlaneNormal, viewPos.xyz)) * (extrude.x * 2.0 - 1.0) * glowWidth;
|
|
21
20
|
ndcPos.x += xPaddingPixels * pixelToNDC.x;
|
|
22
21
|
uv = ndcPos * 0.5 + 0.5;
|
|
23
|
-
gl_Position = vec4(ndcPos, 0, 1)
|
|
24
|
-
}`),w.uniforms.add(new s("perScreenPixelRatio",((e,i)=>i.camera.perScreenPixelRatio))),w.code.add(l`float planeDistancePixels(vec4 plane, vec3 pos, vec3 start, vec3 end) {
|
|
22
|
+
gl_Position = vec4(ndcPos, 0, 1);`),w.uniforms.add(new s("perScreenPixelRatio",((e,i)=>i.camera.perScreenPixelRatio))),w.code.add(l`float planeDistancePixels(vec4 plane, vec3 pos, vec3 start, vec3 end) {
|
|
25
23
|
vec3 origin = mix(start, end, 0.5);
|
|
26
24
|
vec3 basis = end - origin;
|
|
27
25
|
vec3 posAtOrigin = pos - origin;
|
|
@@ -34,9 +32,7 @@ float width = fwidth(y);
|
|
|
34
32
|
float maxPixelDistance = length(pos) * perScreenPixelRatio * 2.0;
|
|
35
33
|
float pixelDist = dist / min(width, maxPixelDistance);
|
|
36
34
|
return abs(pixelDist);
|
|
37
|
-
}
|
|
38
|
-
void main() {
|
|
39
|
-
vec3 dEndStart = vViewEnd - vViewStart;
|
|
35
|
+
}`),w.main.add(l`vec3 dEndStart = vViewEnd - vViewStart;
|
|
40
36
|
if (dot(dEndStart, dEndStart) < 1e-5) {
|
|
41
37
|
discard;
|
|
42
38
|
}
|
|
@@ -50,5 +46,4 @@ discard;
|
|
|
50
46
|
float distance = planeDistancePixels(vViewPlane, pos, vViewStart, vViewEnd);
|
|
51
47
|
vec4 color = laserlineProfile(distance);
|
|
52
48
|
float alpha = (1.0 - smoothstep(0.995 - angleCutoffAdjust, 0.999 - angleCutoffAdjust, abs(dot(normal, vViewPlane.xyz))));
|
|
53
|
-
fragColor = laserlineOutput(color * alpha * depthDiscontinuityAlpha);
|
|
54
|
-
}`),t}const m=t(),p=i(),w=Object.freeze(Object.defineProperty({__proto__:null,build:v},Symbol.toStringTag,{value:"Module"}));export{w as L,v as b};
|
|
49
|
+
fragColor = laserlineOutput(color * alpha * depthDiscontinuityAlpha);`),t}const m=t(),p=i(),w=Object.freeze(Object.defineProperty({__proto__:null,build:v},Symbol.toStringTag,{value:"Module"}));export{w as L,v as b};
|