@arcgis/core 4.24.0-next.20220401 → 4.24.0-next.20220404

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.
Files changed (157) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{c665e9b7d09fe516f138.js → 2fe10c5c01056babeae5.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{8771296b537f366596c4.js → 37aa4532e25d54055e40.js} +54 -54
  4. package/assets/esri/core/workers/chunks/528033aa0d663b4d41bf.js +1 -0
  5. package/assets/esri/core/workers/chunks/{0e29250c24a3a7b1ce13.js → 6de5a790c14f04c6c302.js} +1 -1
  6. package/assets/esri/core/workers/chunks/b1188ca77b975c6a7d92.js +1 -0
  7. package/chunks/BlendLayers.glsl.js +1 -1
  8. package/chunks/DefaultMaterial.glsl.js +26 -26
  9. package/chunks/HUDMaterial.glsl.js +37 -37
  10. package/chunks/HighlightDownsample.glsl.js +1 -1
  11. package/chunks/ImageMaterial.glsl.js +10 -10
  12. package/chunks/LineMarker.glsl.js +75 -32
  13. package/chunks/RealisticTree.glsl.js +26 -26
  14. package/chunks/SMAA.glsl.js +2 -2
  15. package/chunks/SSAO.glsl.js +2 -2
  16. package/chunks/SimpleAtmosphere.glsl.js +10 -10
  17. package/chunks/TextureOnly.glsl.js +2 -2
  18. package/core/accessorSupport/Property.js +1 -1
  19. package/interfaces.d.ts +25 -7
  20. package/package.json +1 -1
  21. package/smartMapping/renderers/color.js +1 -1
  22. package/smartMapping/renderers/dotDensity.js +1 -1
  23. package/smartMapping/renderers/heatmap.js +1 -1
  24. package/smartMapping/renderers/location.js +1 -1
  25. package/smartMapping/renderers/predominance.js +1 -1
  26. package/smartMapping/renderers/relationship.js +1 -1
  27. package/smartMapping/renderers/size.js +1 -1
  28. package/smartMapping/renderers/type.js +1 -1
  29. package/smartMapping/symbology/color.js +1 -1
  30. package/smartMapping/symbology/dotDensity.js +1 -1
  31. package/smartMapping/symbology/flow.js +1 -1
  32. package/smartMapping/symbology/heatmap.js +1 -1
  33. package/smartMapping/symbology/location.js +1 -1
  34. package/smartMapping/symbology/predominance.js +1 -1
  35. package/smartMapping/symbology/relationship.js +1 -1
  36. package/smartMapping/symbology/size.js +1 -1
  37. package/smartMapping/symbology/type.js +1 -1
  38. package/support/revision.js +1 -1
  39. package/views/2d/engine/Stage.js +1 -1
  40. package/views/2d/engine/flow/BrushFlow.js +1 -1
  41. package/views/2d/engine/imagery/BrushRasterBitmap.js +1 -1
  42. package/views/2d/engine/imagery/BrushVectorField.js +1 -1
  43. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  44. package/views/2d/engine/webgl/Painter.js +1 -1
  45. package/views/2d/engine/webgl/brushes/BrushBitmap.js +1 -1
  46. package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
  47. package/views/2d/engine/webgl/brushes/WGLBrushInfo.js +1 -1
  48. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
  49. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +1 -1
  50. package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +1 -1
  51. package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +1 -1
  52. package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +1 -1
  53. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
  54. package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
  55. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel.js +1 -1
  56. package/views/2d/engine/webgl/brushes/WGLGeometryBrushLine.js +1 -1
  57. package/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker.js +1 -1
  58. package/views/2d/engine/webgl/brushes/WGLGeometryBrushText.js +1 -1
  59. package/views/2d/engine/webgl/effects/post-processing/EffectManager.js +1 -1
  60. package/views/3d/environment/CloudsComposition.js +1 -1
  61. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  62. package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
  63. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  64. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  65. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  66. package/views/3d/terrain/TerrainRenderer.js +1 -1
  67. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  68. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  69. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  70. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  71. package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
  72. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +6 -6
  73. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +6 -6
  74. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +3 -3
  75. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +5 -5
  76. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +12 -12
  77. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +7 -7
  78. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -9
  79. package/views/3d/webgl-engine/core/shaderModules/BooleanUniform.js +1 -1
  80. package/views/3d/webgl-engine/core/shaderModules/Float2Uniform.js +1 -1
  81. package/views/3d/webgl-engine/core/shaderModules/Float4Uniform.js +1 -1
  82. package/views/3d/webgl-engine/core/shaderModules/Float4sUniform.js +1 -1
  83. package/views/3d/webgl-engine/core/shaderModules/FloatUniform.js +1 -1
  84. package/views/3d/webgl-engine/core/shaderModules/FloatsUniform.js +1 -1
  85. package/views/3d/webgl-engine/core/shaderModules/IntegerUniform.js +1 -1
  86. package/views/3d/webgl-engine/core/shaderModules/Matrix3Uniform.js +1 -1
  87. package/views/3d/webgl-engine/core/shaderModules/Texture2DUniform.js +1 -1
  88. package/views/3d/webgl-engine/core/shaderModules/Uniform.js +1 -1
  89. package/views/3d/webgl-engine/core/shaderTechnique/BindType.js +1 -1
  90. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  91. package/views/3d/webgl-engine/lib/Program.js +1 -1
  92. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  93. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  94. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  95. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  96. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  97. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  98. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  99. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  100. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  101. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  102. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  103. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  104. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  105. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  106. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  107. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  108. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  109. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  110. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  111. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  112. package/views/MapView.js +1 -1
  113. package/views/SceneView.js +1 -1
  114. package/views/support/DefaultsFromMap.js +1 -1
  115. package/views/support/screenshotUtils.js +1 -1
  116. package/widgets/Editor.js +1 -1
  117. package/assets/esri/core/workers/chunks/5682039666f874836451.js +0 -1
  118. package/assets/esri/core/workers/chunks/79bdb26244ec7b4472fe.js +0 -1
  119. package/chunks/color.js +0 -5
  120. package/chunks/dotDensity.js +0 -5
  121. package/chunks/heatmap.js +0 -5
  122. package/chunks/location.js +0 -5
  123. package/chunks/predominance.js +0 -5
  124. package/chunks/relationship.js +0 -5
  125. package/chunks/size.js +0 -5
  126. package/chunks/type.js +0 -5
  127. package/renderers/smartMapping/creators/color.js +0 -5
  128. package/renderers/smartMapping/creators/dotDensity.js +0 -5
  129. package/renderers/smartMapping/creators/heatmap.js +0 -5
  130. package/renderers/smartMapping/creators/location.js +0 -5
  131. package/renderers/smartMapping/creators/opacity.js +0 -5
  132. package/renderers/smartMapping/creators/predominance.js +0 -5
  133. package/renderers/smartMapping/creators/relationship.js +0 -5
  134. package/renderers/smartMapping/creators/size.js +0 -5
  135. package/renderers/smartMapping/creators/support/utils.js +0 -5
  136. package/renderers/smartMapping/creators/type.js +0 -5
  137. package/renderers/smartMapping/creators/univariateColorSize.js +0 -5
  138. package/renderers/smartMapping/heuristics/scaleRange.js +0 -5
  139. package/renderers/smartMapping/heuristics/sizeRange.js +0 -5
  140. package/renderers/smartMapping/statistics/classBreaks.js +0 -5
  141. package/renderers/smartMapping/statistics/heatmapStatistics.js +0 -5
  142. package/renderers/smartMapping/statistics/histogram.js +0 -5
  143. package/renderers/smartMapping/statistics/predominantCategories.js +0 -5
  144. package/renderers/smartMapping/statistics/summaryStatistics.js +0 -5
  145. package/renderers/smartMapping/statistics/summaryStatisticsForAge.js +0 -5
  146. package/renderers/smartMapping/statistics/support/ageUtils.js +0 -5
  147. package/renderers/smartMapping/statistics/uniqueValues.js +0 -5
  148. package/renderers/smartMapping/symbology/color.js +0 -5
  149. package/renderers/smartMapping/symbology/dotDensity.js +0 -5
  150. package/renderers/smartMapping/symbology/heatmap.js +0 -5
  151. package/renderers/smartMapping/symbology/location.js +0 -5
  152. package/renderers/smartMapping/symbology/predominance.js +0 -5
  153. package/renderers/smartMapping/symbology/relationship.js +0 -5
  154. package/renderers/smartMapping/symbology/size.js +0 -5
  155. package/renderers/smartMapping/symbology/support/colorRamps.js +0 -5
  156. package/renderers/smartMapping/symbology/support/utils.js +0 -5
  157. package/renderers/smartMapping/symbology/type.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardByOpacity.glsl.js";import{ShaderOutput as r}from"../../../core/shaderLibrary/ShaderOutputOptions.js";import{NormalAttributeType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttributeType as i}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{NormalsDoubleSidedMode as a}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as n}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{BindType as d}from"../../../core/shaderTechnique/BindType.js";import{parameter as l,ShaderTechniqueConfiguration as h}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as c,AlphaDiscardMode as u,TransparencyPassType as y}from"../../../lib/basicInterfaces.js";var v,T;!function(o){o[o.None=0]="None",o[o.Transparent=1]="Transparent",o[o.Opaque=2]="Opaque",o[o.COUNT=3]="COUNT"}(v||(v={})),function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class m extends h{constructor(){super(...arguments),this.output=r.Color,this.textureCoordinateType=i.None,this.componentData=e.Uniform,this.cullFace=c.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=a.WindingOrder,this.alphaDiscardMode=u.Opaque,this.integratedMeshMode=T.None,this.transparencyPassType=y.NONE,this.ellipsoidMode=n.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.spherical=!1,this.doublePrecisionRequiresObfuscation=!1,this.hasVertexColors=!1,this.hasNormals=!1,this.hasSlicePlane=!1,this.hasBaseColorTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.hasScreenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.hasMultipassTerrain=!1,this.cullAboveGround=!1,this.enableFillLights=!1}}o([l({count:r.COUNT})],m.prototype,"output",void 0),o([l({count:i.COUNT})],m.prototype,"textureCoordinateType",void 0),o([l({count:e.COUNT})],m.prototype,"componentData",void 0),o([l({count:c.COUNT})],m.prototype,"cullFace",void 0),o([l({count:t.COUNT})],m.prototype,"vertexDiscardMode",void 0),o([l({count:a.COUNT})],m.prototype,"doubleSidedMode",void 0),o([l({count:u.COUNT})],m.prototype,"alphaDiscardMode",void 0),o([l({count:T.COUNT})],m.prototype,"integratedMeshMode",void 0),o([l({count:y.COUNT})],m.prototype,"transparencyPassType",void 0),o([l({count:n.COUNT})],m.prototype,"ellipsoidMode",void 0),o([l({count:p.COUNT})],m.prototype,"pbrMode",void 0),o([l({count:s.COUNT})],m.prototype,"normalType",void 0),o([l()],m.prototype,"spherical",void 0),o([l()],m.prototype,"doublePrecisionRequiresObfuscation",void 0),o([l()],m.prototype,"hasVertexColors",void 0),o([l()],m.prototype,"hasNormals",void 0),o([l()],m.prototype,"hasSlicePlane",void 0),o([l()],m.prototype,"hasBaseColorTexture",void 0),o([l()],m.prototype,"receiveAmbientOcclusion",void 0),o([l()],m.prototype,"receiveShadows",void 0),o([l()],m.prototype,"blendingEnabled",void 0),o([l()],m.prototype,"hasScreenSpaceReflections",void 0),o([l()],m.prototype,"hasPolygonOffset",void 0),o([l()],m.prototype,"hasMetalnessAndRoughnessTexture",void 0),o([l()],m.prototype,"hasEmissionTexture",void 0),o([l()],m.prototype,"hasOcclusionTexture",void 0),o([l()],m.prototype,"hasNormalTexture",void 0),o([l()],m.prototype,"hasOccludees",void 0),o([l()],m.prototype,"hasMultipassTerrain",void 0),o([l()],m.prototype,"cullAboveGround",void 0),o([l()],m.prototype,"enableFillLights",void 0),o([l({constValue:d.Pass})],m.prototype,"slicePlaneBindType",void 0),o([l({constValue:!0})],m.prototype,"hasSliceHighlight",void 0),o([l({constValue:!1})],m.prototype,"hasSliceInVertexProgram",void 0),o([l({constValue:!1})],m.prototype,"useCustomDTRExponentForWater",void 0),o([l({constValue:!1})],m.prototype,"hasVertexTangents",void 0),o([l({constValue:!0})],m.prototype,"supportsTextureAtlas",void 0),o([l({constValue:!1})],m.prototype,"highStepCount",void 0),o([l({constValue:!1})],m.prototype,"instancedDoublePrecision",void 0);export{m as ComponentTechniqueConfiguration,T as IntegratedMeshMode,v as PassDiscardMode};
5
+ import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardByOpacity.glsl.js";import{ShaderOutput as r}from"../../../core/shaderLibrary/ShaderOutputOptions.js";import{NormalAttributeType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttributeType as i}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{NormalsDoubleSidedMode as a}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as n}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{BindType as d}from"../../../core/shaderTechnique/BindType.js";import{parameter as l,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as h,AlphaDiscardMode as u,TransparencyPassType as y}from"../../../lib/basicInterfaces.js";var v,T;!function(o){o[o.None=0]="None",o[o.Transparent=1]="Transparent",o[o.Opaque=2]="Opaque",o[o.COUNT=3]="COUNT"}(v||(v={})),function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class m extends c{constructor(){super(...arguments),this.output=r.Color,this.textureCoordinateType=i.None,this.componentData=e.Uniform,this.cullFace=h.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=a.WindingOrder,this.alphaDiscardMode=u.Opaque,this.integratedMeshMode=T.None,this.transparencyPassType=y.NONE,this.ellipsoidMode=n.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.spherical=!1,this.doublePrecisionRequiresObfuscation=!1,this.hasVertexColors=!1,this.hasNormals=!1,this.hasSlicePlane=!1,this.hasBaseColorTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.hasScreenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.hasMultipassTerrain=!1,this.cullAboveGround=!1}}o([l({count:r.COUNT})],m.prototype,"output",void 0),o([l({count:i.COUNT})],m.prototype,"textureCoordinateType",void 0),o([l({count:e.COUNT})],m.prototype,"componentData",void 0),o([l({count:h.COUNT})],m.prototype,"cullFace",void 0),o([l({count:t.COUNT})],m.prototype,"vertexDiscardMode",void 0),o([l({count:a.COUNT})],m.prototype,"doubleSidedMode",void 0),o([l({count:u.COUNT})],m.prototype,"alphaDiscardMode",void 0),o([l({count:T.COUNT})],m.prototype,"integratedMeshMode",void 0),o([l({count:y.COUNT})],m.prototype,"transparencyPassType",void 0),o([l({count:n.COUNT})],m.prototype,"ellipsoidMode",void 0),o([l({count:p.COUNT})],m.prototype,"pbrMode",void 0),o([l({count:s.COUNT})],m.prototype,"normalType",void 0),o([l()],m.prototype,"spherical",void 0),o([l()],m.prototype,"doublePrecisionRequiresObfuscation",void 0),o([l()],m.prototype,"hasVertexColors",void 0),o([l()],m.prototype,"hasNormals",void 0),o([l()],m.prototype,"hasSlicePlane",void 0),o([l()],m.prototype,"hasBaseColorTexture",void 0),o([l()],m.prototype,"receiveAmbientOcclusion",void 0),o([l()],m.prototype,"receiveShadows",void 0),o([l()],m.prototype,"blendingEnabled",void 0),o([l()],m.prototype,"hasScreenSpaceReflections",void 0),o([l()],m.prototype,"hasPolygonOffset",void 0),o([l()],m.prototype,"hasMetalnessAndRoughnessTexture",void 0),o([l()],m.prototype,"hasEmissionTexture",void 0),o([l()],m.prototype,"hasOcclusionTexture",void 0),o([l()],m.prototype,"hasNormalTexture",void 0),o([l()],m.prototype,"hasOccludees",void 0),o([l()],m.prototype,"hasMultipassTerrain",void 0),o([l()],m.prototype,"cullAboveGround",void 0),o([l({constValue:d.Pass})],m.prototype,"slicePlaneBindType",void 0),o([l({constValue:d.Material})],m.prototype,"pbrTextureBindType",void 0),o([l({constValue:!0})],m.prototype,"hasSliceHighlight",void 0),o([l({constValue:!1})],m.prototype,"hasSliceInVertexProgram",void 0),o([l({constValue:!1})],m.prototype,"useCustomDTRExponentForWater",void 0),o([l({constValue:!1})],m.prototype,"hasVertexTangents",void 0),o([l({constValue:!0})],m.prototype,"supportsTextureAtlas",void 0),o([l({constValue:!1})],m.prototype,"highStepCount",void 0),o([l({constValue:!1})],m.prototype,"instancedDoublePrecision",void 0),o([l({constValue:!0})],m.prototype,"useFillLights",void 0);export{m as ComponentTechniqueConfiguration,T as IntegratedMeshMode,v as PassDiscardMode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- class t{constructor(){this._dirty=!0}_setDirty(){this._dirty=!0}_setClean(){if(this._dirty=!1,null!=this._parameterBlocks)for(const t of this._parameterBlocks)this[t]._setClean()}get dirty(){return this._dirty||this._checkParameterBlocksDirty()}_checkParameterBlocksDirty(){if(null==this._parameterBlocks)return!1;for(const t of this._parameterBlocks)if(this[t].dirty)return!0;return!1}}class r{constructor(){this._dirty=!0}_setDirty(){this._dirty=!0}_setClean(){this._dirty=!1}get dirty(){return this._dirty}}function e(t={}){return(r,e)=>{var s;const i=null!=(s=r._parameterCount)?s:0;if(r._parameterCount=i+1,t.vectorOps){const s=t.vectorOps;Object.defineProperty(r,e,{get(){return this[i]},set(t){const r=this[i];if(null==r)this[i]=t;else{if(s.equals(r,t))return;s.copy(r,t)}this._setDirty()}})}else Object.defineProperty(r,e,{get(){return this[i]},set(r){this[i]!==r&&(t.dispose&&this[i]&&this[i].dispose(),this[i]=r,this._setDirty())}})}}function s(){return(t,r)=>{var e;const s=null!=(e=t._parameterCount)?e:0;t._parameterCount=s+1,t._parameterBlocks=t._parameterBlocks||[],t._parameterBlocks.push(s),Object.defineProperty(t,r,{get(){return this[s]},set(t){this[s]!==t&&(this[s]=t,this._setDirty())}})}}export{t as MaterialBase,r as MaterialParameterBlock,e as parameter,s as parameterBlock};
5
+ import{NoParameters as t}from"../shaderModules/interfaces.js";class r extends t{constructor(){super(...arguments),this._dirty=!0}_setDirty(){this._dirty=!0}_setClean(){if(this._dirty=!1,null!=this._parameterBlocks)for(const t of this._parameterBlocks)this[t]._setClean()}get dirty(){return this._dirty||this._checkParameterBlocksDirty()}_checkParameterBlocksDirty(){if(null==this._parameterBlocks)return!1;for(const t of this._parameterBlocks)if(this[t].dirty)return!0;return!1}}class e{constructor(){this._dirty=!0}_setDirty(){this._dirty=!0}_setClean(){this._dirty=!1}get dirty(){return this._dirty}}function s(t={}){return(r,e)=>{var s;const i=null!=(s=r._parameterCount)?s:0;if(r._parameterCount=i+1,t.vectorOps){const s=t.vectorOps;Object.defineProperty(r,e,{get(){return this[i]},set(t){const r=this[i];if(null==r)this[i]=t;else{if(s.equals(r,t))return;s.copy(r,t)}this._setDirty()}})}else Object.defineProperty(r,e,{get(){return this[i]},set(r){this[i]!==r&&(t.dispose&&this[i]&&this[i].dispose(),this[i]=r,this._setDirty())}})}}function i(){return(t,r)=>{var e;const s=null!=(e=t._parameterCount)?e:0;t._parameterCount=s+1,t._parameterBlocks=t._parameterBlocks||[],t._parameterBlocks.push(s),Object.defineProperty(t,r,{get(){return this[s]},set(t){this[s]!==t&&(this[s]=t,this._setDirty())}})}}export{r as MaterialBase,e as MaterialParameterBlock,s as parameter,i as parameterBlock};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{releaseMaybe as e,isSome as t}from"../../../../../core/maybe.js";import{isPromiseLike as s}from"../../../../../core/promiseUtils.js";class i{constructor(t,i){this._textureRep=t,this._disposed=!1;const r=this._textureRep.acquire(i);s(r)?(r.then((t=>{this._disposed?e(t):this._textureRef=t})),this.loadPromise=r):this._textureRef=r}dispose(){this._textureRef=e(this._textureRef),this._disposed=!0}bind(e,s,i){const r=t(this._textureRef)?this._textureRef.glTexture:null;t(r)&&(e.bindTexture(s,r),e.setUniform2f(i,r.descriptor.width,r.descriptor.height))}}export{i as RenderTexture};
5
+ import{releaseMaybe as e,isSome as t}from"../../../../../core/maybe.js";import{isPromiseLike as s}from"../../../../../core/promiseUtils.js";class r{constructor(t,r){this._textureRep=t,this._disposed=!1;const i=this._textureRep.acquire(r);s(i)?(i.then((t=>{this._disposed?e(t):this._textureRef=t})),this.loadPromise=i):this._textureRef=i}dispose(){this._textureRef=e(this._textureRef),this._disposed=!0}get glTexture(){return t(this._textureRef)?this._textureRef.glTexture:null}}export{r as RenderTexture};
@@ -2,7 +2,9 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{unwrap as e,isNone as s,isSome as a}from"../../../../../core/maybe.js";import{j as i}from"../../../../../chunks/mat4.js";import{c as o}from"../../../../../chunks/mat4f64.js";import{s as r,b as c,m as l,a as t}from"../../../../../chunks/vec3.js";import{Z as n,c as d}from"../../../../../chunks/vec3f64.js";import{Float3Uniform as f}from"../shaderModules/Float3Uniform.js";import{glsl as _}from"../shaderModules/interfaces.js";import{BindType as m}from"../shaderTechnique/BindType.js";class h{constructor(e){this.slicePlaneLocalOrigin=e}}function p(o,d){if(d.hasSlicePlane){o.extensions.add("GL_OES_standard_derivatives");const h=(e,s)=>d.instancedDoublePrecision?r(P,s.camera.viewInverseTransposeMatrix[3],s.camera.viewInverseTransposeMatrix[7],s.camera.viewInverseTransposeMatrix[11]):e.slicePlaneLocalOrigin,p=(e,s)=>a(e)?c(H,s.origin,e):s.origin,v=(e,s)=>d.hasSliceTranslatedView?a(e)?i(g,s.camera.viewMatrix,e):s.camera.viewMatrix:null,I=(e,i)=>{if(s(i.slicePlane))return n;const o=h(e,i),r=p(o,i.slicePlane),c=v(o,i);return a(c)?l(H,r,c):r},B=(e,i,o)=>{if(s(o)||s(i.slicePlane))return n;const r=h(e,i),d=p(r,i.slicePlane),f=v(r,i);return a(f)?(t(u,o,d),l(H,d,f),l(u,u,f),c(u,u,H)):o},b=new f("slicePlaneOrigin",d.slicePlaneBindType,I),S=new f("slicePlaneBasis1",d.slicePlaneBindType,((s,a)=>{var i;return B(s,a,null==(i=e(a.slicePlane))?void 0:i.basis1)})),T=new f("slicePlaneBasis2",m.Pass,((s,a)=>{var i;return B(s,a,null==(i=e(a.slicePlane))?void 0:i.basis2)}));d.hasSliceInVertexProgram&&(o.vertex.uniforms.add(b),o.vertex.uniforms.add(S),o.vertex.uniforms.add(T)),o.fragment.uniforms.add(b),o.fragment.uniforms.add(S),o.fragment.uniforms.add(T);const L=_`struct SliceFactors {
5
+ import{isNone as e,isSome as s,unwrap as i}from"../../../../../core/maybe.js";import{j as a}from"../../../../../chunks/mat4.js";import{c}from"../../../../../chunks/mat4f64.js";import{s as o,b as l,m as r,a as t}from"../../../../../chunks/vec3.js";import{Z as n,c as d}from"../../../../../chunks/vec3f64.js";import{Float3Uniform as f}from"../shaderModules/Float3Uniform.js";import{NoParameters as _,glsl as p}from"../shaderModules/interfaces.js";import{BindType as h}from"../shaderTechnique/BindType.js";class P extends _{constructor(e){super(),this.slicePlaneLocalOrigin=e}}function m(c,d){if(!d.hasSlicePlane){const e=p`#define rejectBySlice(_pos_) false
6
+ #define discardBySlice(_pos_) {}
7
+ #define highlightSlice(_color_, _pos_) (_color_)`;return d.hasSliceInVertexProgram&&c.vertex.code.add(e),void c.fragment.code.add(e)}c.extensions.add("GL_OES_standard_derivatives");const _=(e,s)=>d.instancedDoublePrecision?o(H,s.camera.viewInverseTransposeMatrix[3],s.camera.viewInverseTransposeMatrix[7],s.camera.viewInverseTransposeMatrix[11]):e.slicePlaneLocalOrigin,P=(e,i)=>s(e)?l(u,i.origin,e):i.origin,m=(e,i)=>d.hasSliceTranslatedView?s(e)?a(v,i.camera.viewMatrix,e):i.camera.viewMatrix:null,I=(i,a)=>{if(e(a.slicePlane))return n;const c=_(i,a),o=P(c,a.slicePlane),l=m(c,a);return s(l)?r(u,o,l):o},B=(i,a,c)=>{if(e(c)||e(a.slicePlane))return n;const o=_(i,a),d=P(o,a.slicePlane),f=m(o,a);return s(f)?(t(g,c,d),r(u,d,f),r(g,g,f),l(g,g,u)):c},T=(e,s)=>{var a;return B(e,s,null==(a=i(s.slicePlane))?void 0:a.basis1)},b=(e,s)=>{var a;return B(e,s,null==(a=i(s.slicePlane))?void 0:a.basis2)},S=(d.slicePlaneBindType,h.Pass,[new f("slicePlaneOrigin",d.slicePlaneBindType,I),new f("slicePlaneBasis1",d.slicePlaneBindType,T),new f("slicePlaneBasis2",d.slicePlaneBindType,b)]);d.hasSliceInVertexProgram&&c.vertex.uniforms.add(S),c.fragment.uniforms.add(S);const L=p`struct SliceFactors {
6
8
  float front;
7
9
  float side0;
8
10
  float side1;
@@ -39,7 +41,7 @@ bool sliceByPlane(vec3 pos) {
39
41
  return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
40
42
  }
41
43
  #define rejectBySlice(_pos_) sliceByPlane(_pos_)
42
- #define discardBySlice(_pos_) { if (sliceByPlane(_pos_)) discard; }`,G=_`vec4 applySliceHighlight(vec4 color, vec3 pos) {
44
+ #define discardBySlice(_pos_) { if (sliceByPlane(_pos_)) discard; }`,G=p`vec4 applySliceHighlight(vec4 color, vec3 pos) {
43
45
  SliceFactors factors = calculateSliceFactors(pos);
44
46
  const float HIGHLIGHT_WIDTH = 1.0;
45
47
  const vec4 HIGHLIGHT_COLOR = vec4(0.0, 0.0, 0.0, 0.3);
@@ -57,9 +59,7 @@ float highlightFactor = (1.0 - step(0.5, factors.front))
57
59
  * (1.0 - step(0.5, factors.side2))
58
60
  * (1.0 - step(0.5, factors.side3));
59
61
  return mix(color, vec4(HIGHLIGHT_COLOR.rgb, color.a), highlightFactor * HIGHLIGHT_COLOR.a);
60
- }`,x=d.hasSliceHighlight?_`
62
+ }`,y=d.hasSliceHighlight?p`
61
63
  ${G}
62
64
  #define highlightSlice(_color_, _pos_) (sliceEnabled() ? applySliceHighlight(_color_, _pos_) : (_color_))
63
- `:_`#define highlightSlice(_color_, _pos_) (_color_)`;d.hasSliceInVertexProgram&&o.vertex.code.add(L),o.fragment.code.add(L),o.fragment.code.add(x)}else{const e=_`#define rejectBySlice(_pos_) false
64
- #define discardBySlice(_pos_) {}
65
- #define highlightSlice(_color_, _pos_) (_color_)`;d.hasSliceInVertexProgram&&o.vertex.code.add(e),o.fragment.code.add(e)}}const P=d(),H=d(),u=d(),g=o();export{p as Slice,h as SlicePlaneParameters};
65
+ `:p`#define highlightSlice(_color_, _pos_) (_color_)`;d.hasSliceInVertexProgram&&c.vertex.code.add(L),c.fragment.code.add(L),c.fragment.code.add(y)}const H=d(),u=d(),g=d(),v=c();export{m as Slice,P as SlicePlaneParameters};
@@ -2,13 +2,13 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{TextureCoordinateAttribute as t,TextureCoordinateAttributeType as r}from"./TextureCoordinateAttribute.glsl.js";import{TextureAtlasLookup as o}from"../util/TextureAtlasLookup.glsl.js";import{glsl as a}from"../../shaderModules/interfaces.js";function u(u,s){switch(u.include(t,s),u.fragment.code.add(a`
5
+ import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{TextureCoordinateAttribute as t,TextureCoordinateAttributeType as r}from"./TextureCoordinateAttribute.glsl.js";import{TextureAtlasLookup as u}from"../util/TextureAtlasLookup.glsl.js";import{glsl as o}from"../../shaderModules/interfaces.js";function a(a,s){switch(a.include(t,s),a.fragment.code.add(o`
6
6
  struct TextureLookupParameter {
7
7
  vec2 uv;
8
8
  ${s.supportsTextureAtlas?"vec2 size;":""}
9
9
  } vtc;
10
- `),s.textureCoordinateType){case r.Default:return void u.fragment.code.add(a`vec4 textureLookup(sampler2D tex, TextureLookupParameter params) {
11
- return texture2D(tex, params.uv);
12
- }`);case r.Atlas:return u.include(o),void u.fragment.code.add(a`vec4 textureLookup(sampler2D tex, TextureLookupParameter params) {
13
- return textureAtlasLookup(tex, params.size, params.uv, vuvRegion);
14
- }`);default:e(s.textureCoordinateType);case r.None:case r.COUNT:return}}export{u as VertexTextureCoordinates};
10
+ `),s.textureCoordinateType){case r.Default:return void a.fragment.code.add(o`vec4 textureLookup(sampler2D texture, TextureLookupParameter params) {
11
+ return texture2D(texture, params.uv);
12
+ }`);case r.Atlas:return a.include(u),void a.fragment.code.add(o`vec4 textureLookup(sampler2D texture, TextureLookupParameter params) {
13
+ return textureAtlasLookup(texture, params.size, params.uv, vuvRegion);
14
+ }`);default:e(s.textureCoordinateType);case r.None:case r.COUNT:return}}export{a as VertexTextureCoordinates};
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{ShaderOutput as o}from"../ShaderOutputOptions.js";import{Slice as r}from"../Slice.glsl.js";import{Transform as e}from"../Transform.glsl.js";import{NormalAttribute as t,NormalAttributeType as i}from"../attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as a}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as l}from"../attributes/VertexNormal.glsl.js";import{OutputDepth as s}from"../output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../output/OutputHighlight.glsl.js";import{VisualVariables as n}from"../shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlpha as u}from"../util/AlphaDiscard.glsl.js";import{addProjViewLocalOrigin as m}from"../util/View.glsl.js";import{Float2Uniform as p}from"../../shaderModules/Float2Uniform.js";import{glsl as c}from"../../shaderModules/interfaces.js";import{Texture2DUniform as v}from"../../shaderModules/Texture2DUniform.js";import{BindType as f}from"../../shaderTechnique/BindType.js";function h(h,g){const x=h.vertex.code,j=h.fragment.code,T=g.hasModelTransformation;g.output!==o.Depth&&g.output!==o.Shadow||(m(h,g),h.include(e,{linearDepth:!0,hasModelTransformation:T}),h.include(a,g),h.include(n,g),h.include(s,g),h.include(r,g),h.vertex.uniforms.add(new p("nearFar",f.Pass,((o,r)=>r.camera.nearFar))),h.varyings.add("depth","float"),g.hasColorTexture&&h.fragment.uniforms.add(new v("tex")),x.add(c`
5
+ import{ShaderOutput as o}from"../ShaderOutputOptions.js";import{Slice as r}from"../Slice.glsl.js";import{Transform as e}from"../Transform.glsl.js";import{NormalAttribute as t,NormalAttributeType as i}from"../attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as a}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as s}from"../attributes/VertexNormal.glsl.js";import{OutputDepth as l}from"../output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../output/OutputHighlight.glsl.js";import{VisualVariables as n}from"../shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlpha as u}from"../util/AlphaDiscard.glsl.js";import{addProjViewLocalOrigin as m}from"../util/View.glsl.js";import{Float2Uniform as p}from"../../shaderModules/Float2Uniform.js";import{glsl as c}from"../../shaderModules/interfaces.js";import{Texture2DUniform as v}from"../../shaderModules/Texture2DUniform.js";import{BindType as f}from"../../shaderTechnique/BindType.js";function h(h,g){const x=h.vertex.code,j=h.fragment.code,T=g.hasModelTransformation;g.output!==o.Depth&&g.output!==o.Shadow||(m(h,g),h.include(e,{linearDepth:!0,hasModelTransformation:T}),h.include(a,g),h.include(n,g),h.include(l,g),h.include(r,g),h.vertex.uniforms.add(new p("nearFar",f.Pass,((o,r)=>r.camera.nearFar))),h.varyings.add("depth","float"),g.hasColorTexture&&h.fragment.uniforms.add(new v("tex",f.Pass,(o=>o.texture))),x.add(c`
6
6
  void main(void) {
7
7
  vpos = calculateVPos();
8
8
  vpos = subtractOrigin(vpos);
@@ -18,7 +18,7 @@ import{ShaderOutput as o}from"../ShaderOutputOptions.js";import{Slice as r}from"
18
18
  discardOrAdjustAlpha(texColor);`:""}
19
19
  outputDepth(depth);
20
20
  }
21
- `)),g.output===o.Normal&&(m(h,g),h.include(e,{linearDepth:!1,hasModelTransformation:T}),h.include(t,g),h.include(l,g),h.include(a,g),h.include(n,g),g.hasColorTexture&&h.fragment.uniforms.add(new v("tex")),h.varyings.add("vPositionView","vec3"),x.add(c`
21
+ `)),g.output===o.Normal&&(m(h,g),h.include(e,{linearDepth:!1,hasModelTransformation:T}),h.include(t,g),h.include(s,g),h.include(a,g),h.include(n,g),g.hasColorTexture&&h.fragment.uniforms.add(new v("tex",f.Pass,(o=>o.texture))),h.varyings.add("vPositionView","vec3"),x.add(c`
22
22
  void main(void) {
23
23
  vpos = calculateVPos();
24
24
  vpos = subtractOrigin(vpos);
@@ -41,7 +41,7 @@ import{ShaderOutput as o}from"../ShaderOutputOptions.js";import{Slice as r}from"
41
41
  if (gl_FrontFacing == false) normal = -normal;`}
42
42
  gl_FragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);
43
43
  }
44
- `)),g.output===o.Highlight&&(m(h,g),h.include(e,{linearDepth:!1,hasModelTransformation:T}),h.include(a,g),h.include(n,g),g.hasColorTexture&&h.fragment.uniforms.add(new v("tex")),x.add(c`
44
+ `)),g.output===o.Highlight&&(m(h,g),h.include(e,{linearDepth:!1,hasModelTransformation:T}),h.include(a,g),h.include(n,g),g.hasColorTexture&&h.fragment.uniforms.add(new v("tex",f.Pass,(o=>o.texture))),x.add(c`
45
45
  void main(void) {
46
46
  vpos = calculateVPos();
47
47
  vpos = subtractOrigin(vpos);
@@ -2,17 +2,17 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{TextureCoordinateAttributeType as e}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexTextureCoordinates as t}from"../attributes/VertexTextureCoordinates.glsl.js";import{NormalsDoubleSidedMode as n}from"./Normals.glsl.js";import{Float2Uniform as a}from"../../shaderModules/Float2Uniform.js";import{glsl as r}from"../../shaderModules/interfaces.js";import{Texture2DUniform as o}from"../../shaderModules/Texture2DUniform.js";import{VertexAttribute as s}from"../../../lib/VertexAttribute.js";function d(d,m){const c=d.fragment;m.hasVertexTangents?(d.attributes.add(s.TANGENT,"vec4"),d.varyings.add("vTangent","vec4"),m.doubleSidedMode===n.WindingOrder?c.code.add(r`mat3 computeTangentSpace(vec3 normal) {
5
+ import{TextureCoordinateAttributeType as e}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexTextureCoordinates as t}from"../attributes/VertexTextureCoordinates.glsl.js";import{NormalsDoubleSidedMode as n}from"./Normals.glsl.js";import{glsl as a}from"../../shaderModules/interfaces.js";import{createTexture2DSizeUniforms as r}from"../../shaderModules/Texture2DUniform.js";import{BindType as o}from"../../shaderTechnique/BindType.js";import{VertexAttribute as s}from"../../../lib/VertexAttribute.js";function d(d,m){const c=d.fragment;if(m.hasVertexTangents?(d.attributes.add(s.TANGENT,"vec4"),d.varyings.add("vTangent","vec4"),m.doubleSidedMode===n.WindingOrder?c.code.add(a`mat3 computeTangentSpace(vec3 normal) {
6
6
  float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
7
7
  vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
8
8
  vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
9
9
  return mat3(tangent, bitangent, normal);
10
- }`):c.code.add(r`mat3 computeTangentSpace(vec3 normal) {
10
+ }`):c.code.add(a`mat3 computeTangentSpace(vec3 normal) {
11
11
  float tangentHeadedness = vTangent.w;
12
12
  vec3 tangent = normalize(vTangent.xyz);
13
13
  vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
14
14
  return mat3(tangent, bitangent, normal);
15
- }`)):(d.extensions.add("GL_OES_standard_derivatives"),c.code.add(r`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
15
+ }`)):(d.extensions.add("GL_OES_standard_derivatives"),c.code.add(a`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
16
16
  vec3 Q1 = dFdx(pos);
17
17
  vec3 Q2 = dFdy(pos);
18
18
  vec2 stx = dFdx(st);
@@ -23,11 +23,11 @@ T = T - normal * dot(normal, T);
23
23
  T *= inversesqrt(max(dot(T,T), 1.e-10));
24
24
  vec3 B = sign(det) * cross(normal, T);
25
25
  return mat3(T, B, normal);
26
- }`)),m.textureCoordinateType!==e.None&&(d.include(t,m),c.uniforms.add(new o("normalTexture")),c.uniforms.add(new a("normalTextureSize")),c.code.add(r`
26
+ }`)),m.textureCoordinateType!==e.None){d.include(t,m);const e=m.supportsTextureAtlas;c.uniforms.add(m.pbrTextureBindType===o.Pass?r("normalTexture",o.Pass,(e=>e.textureNormal),e):r("normalTexture",o.Material,(e=>e.textureNormal),e)),c.code.add(a`
27
27
  vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
28
28
  vtc.uv = uv;
29
29
  ${m.supportsTextureAtlas?"vtc.size = normalTextureSize;":""}
30
30
  vec3 rawNormal = textureLookup(normalTexture, vtc).rgb * 2.0 - 1.0;
31
31
  return tangentSpace * rawNormal;
32
32
  }
33
- `))}export{d as ComputeNormalTexture};
33
+ `)}}export{d as ComputeNormalTexture};
@@ -2,19 +2,19 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{EvaluateAmbientLighting as i}from"./EvaluateAmbientLighting.glsl.js";import{EvaluateAmbientOcclusion as n}from"./EvaluateAmbientOcclusion.glsl.js";import{EvaluateMainLighting as o}from"./EvaluateMainLighting.glsl.js";import{PhysicallyBasedRendering as e}from"./PhysicallyBasedRendering.glsl.js";import{PBRMode as t}from"./PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as a}from"./PiUtils.glsl.js";import{ReadShadowMap as r}from"./ReadShadowMap.glsl.js";import{BooleanUniform as l}from"../../shaderModules/BooleanUniform.js";import{FloatUniform as d}from"../../shaderModules/FloatUniform.js";import{glsl as c}from"../../shaderModules/interfaces.js";function m(m,s){const g=m.fragment;m.include(o),m.include(n,s),s.pbrMode!==t.Disabled&&m.include(e,s),m.include(i,s),s.receiveShadows&&m.include(r,s),g.uniforms.add(new d("lightingGlobalFactor")),g.uniforms.add(new d("ambientBoostFactor")),g.uniforms.add(new l("hasFillLights")),m.include(a),g.code.add(c`
5
+ import{EvaluateAmbientLighting as i}from"./EvaluateAmbientLighting.glsl.js";import{EvaluateAmbientOcclusion as n}from"./EvaluateAmbientOcclusion.glsl.js";import{EvaluateMainLighting as o}from"./EvaluateMainLighting.glsl.js";import{PhysicallyBasedRendering as e}from"./PhysicallyBasedRendering.glsl.js";import{PBRMode as t}from"./PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as a}from"./PiUtils.glsl.js";import{ReadShadowMap as r}from"./ReadShadowMap.glsl.js";import{BooleanUniform as l}from"../../shaderModules/BooleanUniform.js";import{FloatUniform as d}from"../../shaderModules/FloatUniform.js";import{glsl as c}from"../../shaderModules/interfaces.js";import{BindType as s}from"../../shaderTechnique/BindType.js";function m(m,g){const u=m.fragment;m.include(o),m.include(n,g),g.pbrMode!==t.Disabled&&m.include(e,g),m.include(i,g),g.receiveShadows&&m.include(r,g),u.uniforms.add(new d("lightingGlobalFactor")),u.uniforms.add(new d("ambientBoostFactor")),m.include(a),u.code.add(c`
6
6
  const float GAMMA_SRGB = 2.1;
7
7
  const float INV_GAMMA_SRGB = 0.4761904;
8
- ${s.pbrMode===t.Disabled?"":"const vec3 GROUND_REFLECTANCE = vec3(0.2);"}
9
- `),g.code.add(c`
8
+ ${g.pbrMode===t.Disabled?"":"const vec3 GROUND_REFLECTANCE = vec3(0.2);"}
9
+ `),u.code.add(c`
10
10
  float additionalDirectedAmbientLight(vec3 vPosWorld) {
11
- float vndl = dot(${s.spherical?c`normalize(vPosWorld)`:c`vec3(0.0, 0.0, 1.0)`}, lightingMainDirection);
11
+ float vndl = dot(${g.spherical?c`normalize(vPosWorld)`:c`vec3(0.0, 0.0, 1.0)`}, lightingMainDirection);
12
12
  return smoothstep(0.0, 1.0, clamp(vndl * 2.5, 0.0, 1.0));
13
13
  }
14
- `),g.code.add(c`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
14
+ `),u.code.add(c`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
15
15
  float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
16
16
  return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * lightingMainIntensity;
17
- }`),s.pbrMode===t.Disabled||s.pbrMode===t.WaterOnIntegratedMesh?g.code.add(c`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight)
17
+ }`),g.pbrMode===t.Disabled||g.pbrMode===t.WaterOnIntegratedMesh?u.code.add(c`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight)
18
18
  {
19
19
  vec3 mainLighting = evaluateMainLighting(normalWorld, shadow);
20
20
  vec3 ambientLighting = calculateAmbientIrradiance(normalWorld, ssao);
@@ -23,7 +23,7 @@ vec3 totalLight = mainLighting + ambientLighting + additionalLight;
23
23
  totalLight = min(totalLight, vec3(PI));
24
24
  vec3 outColor = vec3((albedoLinear / PI) * totalLight);
25
25
  return pow(outColor, vec3(INV_GAMMA_SRGB));
26
- }`):s.pbrMode!==t.Normal&&s.pbrMode!==t.Schematic||(g.code.add(c`const float fillLightIntensity = 0.25;
26
+ }`):g.pbrMode!==t.Normal&&g.pbrMode!==t.Schematic||(u.code.add(c`const float fillLightIntensity = 0.25;
27
27
  const float horizonLightDiffusion = 0.4;
28
28
  const float additionalAmbientIrradianceFactor = 0.02;
29
29
  vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight, vec3 viewDir, vec3 normalGround, vec3 mrr, vec3 _emission, float additionalAmbientIrradiance)
@@ -42,16 +42,16 @@ inputs.RdotNG = clamp(dot(reflectedView, normalGround), -1.0, 1.0);
42
42
  inputs.albedoLinear = pow(albedo, vec3(GAMMA_SRGB));
43
43
  inputs.ssao = ssao;
44
44
  inputs.metalness = mrr[0];
45
- inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);`),g.code.add(c`inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
45
+ inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);`),u.code.add(c`inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
46
46
  inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
47
- inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);`),g.code.add(c`vec3 ambientDir = vec3(5.0 * normalGround[1] - normalGround[0] * normalGround[2], - 5.0 * normalGround[0] - normalGround[2] * normalGround[1], normalGround[1] * normalGround[1] + normalGround[0] * normalGround[0]);
47
+ inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);`),g.useFillLights?u.uniforms.add(new l("hasFillLights",s.Pass,((i,n)=>n.enableFillLights))):u.constants.add("hasFillLights","bool",!1),u.code.add(c`vec3 ambientDir = vec3(5.0 * normalGround[1] - normalGround[0] * normalGround[2], - 5.0 * normalGround[0] - normalGround[2] * normalGround[1], normalGround[1] * normalGround[1] + normalGround[0] * normalGround[0]);
48
48
  ambientDir = ambientDir != vec3(0.0)? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
49
49
  inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
50
50
  vec3 mainLightIrradianceComponent = inputs.NdotL * (1.0 - shadow) * lightingMainIntensity;
51
51
  vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * lightingMainIntensity * fillLightIntensity;
52
52
  vec3 ambientLightIrradianceComponent = calculateAmbientIrradiance(normal, ssao) + additionalLight;
53
53
  inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
54
- inputs.groundIrradianceToSurface = GROUND_REFLECTANCE * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;`),g.code.add(c`vec3 horizonRingDir = inputs.RdotNG * normalGround - reflectedView;
54
+ inputs.groundIrradianceToSurface = GROUND_REFLECTANCE * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;`),u.code.add(c`vec3 horizonRingDir = inputs.RdotNG * normalGround - reflectedView;
55
55
  vec3 horizonRingH = normalize(viewDirection + horizonRingDir);
56
56
  inputs.NdotH_Horizon = dot(normal, horizonRingH);
57
57
  vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(inputs.NdotH, inputs.roughness) * lightingMainIntensity * (1.0 - shadow);
@@ -59,12 +59,12 @@ vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistrib
59
59
  vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance(ssao) + additionalLight;
60
60
  inputs.skyRadianceToSurface = ambientLightRadianceComponent + mainLightRadianceComponent + horizonLightRadianceComponent;
61
61
  inputs.groundRadianceToSurface = GROUND_REFLECTANCE * (ambientLightRadianceComponent + horizonLightRadianceComponent) + mainLightRadianceComponent;
62
- inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + GROUND_REFLECTANCE[1]);`),g.code.add(c`
62
+ inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + GROUND_REFLECTANCE[1]);`),u.code.add(c`
63
63
  vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
64
64
  vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
65
65
  vec3 emissionComponent = pow(_emission, vec3(GAMMA_SRGB));
66
66
  vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent + emissionComponent;
67
- ${s.pbrMode===t.Schematic?c`vec3 outColor = pow(max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance), vec3(INV_GAMMA_SRGB));`:c`vec3 outColor = pow(blackLevelSoftCompression(outColorLinear, inputs), vec3(INV_GAMMA_SRGB));`}
67
+ ${g.pbrMode===t.Schematic?c`vec3 outColor = pow(max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance), vec3(INV_GAMMA_SRGB));`:c`vec3 outColor = pow(blackLevelSoftCompression(outColorLinear, inputs), vec3(INV_GAMMA_SRGB));`}
68
68
  return outColor;
69
69
  }
70
70
  `))}export{m as EvaluateSceneLighting};
@@ -2,20 +2,20 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{f as e}from"../../../../../../chunks/vec3f32.js";import{VertexTextureCoordinates as s}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float2Uniform as o}from"../../shaderModules/Float2Uniform.js";import{Float3Uniform as t}from"../../shaderModules/Float3Uniform.js";import{glsl as r}from"../../shaderModules/interfaces.js";import{Texture2DUniform as a}from"../../shaderModules/Texture2DUniform.js";const i=e(0,.6,.2);var n;function c(e,i){const c=e.fragment,u=i.hasMetalnessAndRoughnessTexture||i.hasEmissionTexture||i.hasOcclusionTexture;i.pbrMode===n.Normal&&u&&e.include(s,i),i.pbrMode!==n.Schematic?i.pbrMode!==n.Disabled?i.pbrMode===n.Normal&&(c.uniforms.add(new t("emissionFactor")),c.uniforms.add(new t("mrrFactors")),c.code.add(r`vec3 mrr;
5
+ import{f as e}from"../../../../../../chunks/vec3f32.js";import{VertexTextureCoordinates as s}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float3Uniform as o}from"../../shaderModules/Float3Uniform.js";import{glsl as t}from"../../shaderModules/interfaces.js";import{createTexture2DSizeUniforms as r}from"../../shaderModules/Texture2DUniform.js";import{BindType as a}from"../../shaderTechnique/BindType.js";const i=e(0,.6,.2);var c;function n(e,i){const n=e.fragment,u=i.hasMetalnessAndRoughnessTexture||i.hasEmissionTexture||i.hasOcclusionTexture;if(i.pbrMode===c.Normal&&u&&e.include(s,i),i.pbrMode!==c.Schematic)if(i.pbrMode!==c.Disabled){if(i.pbrMode===c.Normal){n.uniforms.add(new o("emissionFactor")),n.uniforms.add(new o("mrrFactors")),n.code.add(t`vec3 mrr;
6
6
  vec3 emission;
7
- float occlusion;`),i.hasMetalnessAndRoughnessTexture&&(c.uniforms.add(new a("texMetallicRoughness")),i.supportsTextureAtlas&&c.uniforms.add(new o("texMetallicRoughnessSize")),c.code.add(r`void applyMetallnessAndRoughness(TextureLookupParameter params) {
7
+ float occlusion;`);const e=i.supportsTextureAtlas,s=i.pbrTextureBindType;i.hasMetalnessAndRoughnessTexture&&(n.uniforms.add((a.Pass,r("texMetallicRoughness",s,(e=>e.textureMetallicRoughness),e))),n.code.add(t`void applyMetallnessAndRoughness(TextureLookupParameter params) {
8
8
  vec3 metallicRoughness = textureLookup(texMetallicRoughness, params).rgb;
9
9
  mrr[0] *= metallicRoughness.b;
10
10
  mrr[1] *= metallicRoughness.g;
11
- }`)),i.hasEmissionTexture&&(c.uniforms.add(new a("texEmission")),i.supportsTextureAtlas&&c.uniforms.add(new o("texEmissionSize")),c.code.add(r`void applyEmission(TextureLookupParameter params) {
11
+ }`)),i.hasEmissionTexture&&(n.uniforms.add((a.Pass,r("texEmission",s,(e=>e.textureEmissive),e))),n.code.add(t`void applyEmission(TextureLookupParameter params) {
12
12
  emission *= textureLookup(texEmission, params).rgb;
13
- }`)),i.hasOcclusionTexture?(c.uniforms.add(new a("texOcclusion")),i.supportsTextureAtlas&&c.uniforms.add(new o("texOcclusionSize")),c.code.add(r`void applyOcclusion(TextureLookupParameter params) {
13
+ }`)),i.hasOcclusionTexture?(n.uniforms.add((a.Pass,r("texOcclusion",s,(e=>e.textureOcclusion),e))),n.code.add(t`void applyOcclusion(TextureLookupParameter params) {
14
14
  occlusion *= textureLookup(texOcclusion, params).r;
15
15
  }
16
16
  float getBakedOcclusion() {
17
17
  return occlusion;
18
- }`)):c.code.add(r`float getBakedOcclusion() { return 1.0; }`),c.code.add(r`
18
+ }`)):n.code.add(t`float getBakedOcclusion() { return 1.0; }`),n.code.add(t`
19
19
  void applyPBRFactors() {
20
20
  mrr = mrrFactors;
21
21
  emission = emissionFactor;
@@ -25,8 +25,8 @@ return occlusion;
25
25
  ${i.hasEmissionTexture?i.supportsTextureAtlas?"vtc.size = texEmissionSize; applyEmission(vtc);":"applyEmission(vtc);":""}
26
26
  ${i.hasOcclusionTexture?i.supportsTextureAtlas?"vtc.size = texOcclusionSize; applyOcclusion(vtc);":"applyOcclusion(vtc);":""}
27
27
  }
28
- `)):c.code.add(r`float getBakedOcclusion() { return 1.0; }`):c.code.add(r`const vec3 mrr = vec3(0.0, 0.6, 0.2);
28
+ `)}}else n.code.add(t`float getBakedOcclusion() { return 1.0; }`);else n.code.add(t`const vec3 mrr = vec3(0.0, 0.6, 0.2);
29
29
  const vec3 emission = vec3(0.0);
30
30
  float occlusion = 1.0;
31
31
  void applyPBRFactors() {}
32
- float getBakedOcclusion() { return 1.0; }`)}function u(e,s,o){o===n.Normal&&(e.setUniform3fv("mrrFactors",s.mrrFactors),e.setUniform3fv("emissionFactor",s.emissiveFactor))}!function(e){e[e.Disabled=0]="Disabled",e[e.Normal=1]="Normal",e[e.Schematic=2]="Schematic",e[e.Water=3]="Water",e[e.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",e[e.COUNT=5]="COUNT"}(n||(n={}));export{n as PBRMode,i as PBRSchematicMRRValues,c as PhysicallyBasedRenderingParameters,u as bindPBRUniforms};
32
+ float getBakedOcclusion() { return 1.0; }`)}function u(e,s,o){o===c.Normal&&(e.setUniform3fv("mrrFactors",s.mrrFactors),e.setUniform3fv("emissionFactor",s.emissiveFactor))}!function(e){e[e.Disabled=0]="Disabled",e[e.Normal=1]="Normal",e[e.Schematic=2]="Schematic",e[e.Water=3]="Water",e[e.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",e[e.COUNT=5]="COUNT"}(c||(c={}));export{c as PBRMode,i as PBRSchematicMRRValues,n as PhysicallyBasedRenderingParameters,u as bindPBRUniforms};
@@ -2,13 +2,8 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{TextureCoordinateAttributeType as e}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexTextureCoordinates as r}from"../attributes/VertexTextureCoordinates.glsl.js";import{TextureAtlasLookup as o}from"../util/TextureAtlasLookup.glsl.js";import{Float2Uniform as t}from"../../shaderModules/Float2Uniform.js";import{glsl as u}from"../../shaderModules/interfaces.js";import{Texture2DUniform as s}from"../../shaderModules/Texture2DUniform.js";function a(a,d){const l=a.fragment;d.hasBaseColorTexture?(a.include(r,d),l.uniforms.add(new s("baseColorTexture")),l.uniforms.add(new t("baseColorTextureSize")),d.textureCoordinateType===e.Atlas?(a.include(o),l.code.add(u`vec4 readBaseColorTexture() {
6
- return textureAtlasLookup(
7
- baseColorTexture,
8
- baseColorTextureSize,
9
- vuv0,
10
- vuvRegion
11
- );
12
- }`)):l.code.add(u`vec4 readBaseColorTexture() {
5
+ import{TextureCoordinateAttributeType as e}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexTextureCoordinates as r}from"../attributes/VertexTextureCoordinates.glsl.js";import{TextureAtlasLookup as t}from"../util/TextureAtlasLookup.glsl.js";import{glsl as o}from"../../shaderModules/interfaces.js";import{createTexture2DSizeUniforms as u}from"../../shaderModules/Texture2DUniform.js";import{BindType as s}from"../../shaderTechnique/BindType.js";function a(a,d){const i=a.fragment;if(d.hasBaseColorTexture){a.include(r,d);const l=d.textureCoordinateType===e.Atlas;i.uniforms.add(u("baseColorTexture",s.Material,(e=>e.texture),l)),l?(a.include(t),i.code.add(o`vec4 readBaseColorTexture() {
6
+ return textureAtlasLookup(baseColorTexture, baseColorTextureSize, vuv0, vuvRegion);
7
+ }`)):i.code.add(o`vec4 readBaseColorTexture() {
13
8
  return texture2D(baseColorTexture, vuv0);
14
- }`)):l.code.add(u`vec4 readBaseColorTexture() { return vec4(1.0); }`)}export{a as ReadBaseColorTexture};
9
+ }`)}else i.code.add(o`vec4 readBaseColorTexture() { return vec4(1.0); }`)}export{a as ReadBaseColorTexture};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,o){switch(e){case s.Draw:case s.Pass:return void super(r,"bool",e,o?(s,e,t)=>s.setUniform1b(r,o(e,t)):null);default:super(r,"bool")}}}export{e as BooleanUniform};
5
+ import{Uniform as r}from"./Uniform.js";import{BindType as o}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,s){switch(e){case o.Pass:return void super(r,"bool",e,s?(o,e,t)=>o.setUniform1b(r,s(e,t)):null);case o.Draw:return void super(r,"bool",e,s?(o,e,t)=>o.setUniform1b(r,s(e,t)):null);default:super(r,"bool")}}}export{e as BooleanUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as e}from"./Uniform.js";import{BindType as r}from"../shaderTechnique/BindType.js";class s extends e{constructor(e,s,o){switch(s){case r.Draw:case r.Pass:return void super(e,"vec2",s,o?(r,s,t)=>r.setUniform2fv(e,o(s,t)):null);default:super(e,"vec2")}}}export{s as Float2Uniform};
5
+ import{Uniform as e}from"./Uniform.js";import{BindType as r}from"../shaderTechnique/BindType.js";class s extends e{constructor(e,s,t){switch(s){case r.Pass:return void super(e,"vec2",s,t?(r,s,n)=>r.setUniform2fv(e,t(s,n)):null);case r.Draw:return void super(e,"vec2",s,t?(r,s,n)=>r.setUniform2fv(e,t(s,n)):null);case r.Material:return void super(e,"vec2",s,t?(r,s,n)=>r.setUniform2fv(e,t(s,n)):null);default:super(e,"vec2")}}}export{s as Float2Uniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as e}from"./Uniform.js";import{BindType as r}from"../shaderTechnique/BindType.js";class s extends e{constructor(e,s,o){switch(s){case r.Draw:case r.Pass:return void super(e,"vec4",s,o?(r,s,t)=>r.setUniform4fv(e,o(s,t)):null);default:super(e,"vec4")}}}export{s as Float4Uniform};
5
+ import{Uniform as e}from"./Uniform.js";import{BindType as r}from"../shaderTechnique/BindType.js";class s extends e{constructor(e,s,o){switch(s){case r.Pass:return void super(e,"vec4",s,o?(r,s,t)=>r.setUniform4fv(e,o(s,t)):null);case r.Draw:return void super(e,"vec4",s,o?(r,s,t)=>r.setUniform4fv(e,o(s,t)):null);default:super(e,"vec4")}}}export{s as Float4Uniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,o,t){switch(e){case s.Draw:case s.Pass:return void super(r,"vec4",e,o?(s,e,t)=>s.setUniform4fv(r,o(e,t)):null,t)}}}export{e as Float4sUniform};
5
+ import{Uniform as r}from"./Uniform.js";import{BindType as e}from"../shaderTechnique/BindType.js";class s extends r{constructor(r,s,o,t){switch(s){case e.Pass:return void super(r,"vec4",s,((e,s,t)=>e.setUniform4fv(r,o(s,t))),t);case e.Draw:return void super(r,"vec4",s,((e,s,t)=>e.setUniform4fv(r,o(s,t))),t)}}}export{s as Float4sUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,o){switch(e){case s.Draw:case s.Pass:return void super(r,"float",e,o?(s,e,t)=>s.setUniform1f(r,o(e,t)):null);default:super(r,"float")}}}export{e as FloatUniform};
5
+ import{Uniform as r}from"./Uniform.js";import{BindType as e}from"../shaderTechnique/BindType.js";class s extends r{constructor(r,s,o){switch(s){case e.Pass:return void super(r,"float",s,o?(e,s,t)=>e.setUniform1f(r,o(s,t)):null);case e.Draw:return void super(r,"float",s,o?(e,s,t)=>e.setUniform1f(r,o(s,t)):null);default:super(r,"float")}}}export{s as FloatUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,o,t){switch(e){case s.Draw:case s.Pass:return void super(r,"float",e,o?(s,e,t)=>s.setUniform1fv(r,o(e,t)):null,t)}}}export{e as FloatsUniform};
5
+ import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,o,t){switch(e){case s.Pass:return void super(r,"float",e,((s,e,t)=>s.setUniform1fv(r,o(e,t))),t);case s.Draw:return void super(r,"float",e,((s,e,t)=>s.setUniform1fv(r,o(e,t))),t)}}}export{e as FloatsUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,t){switch(e){case s.Draw:case s.Pass:return void super(r,"int",e,t?(s,e,i)=>s.setUniform1i(r,t(e,i)):null);default:super(r,"int")}}}export{e as IntegerUniform};
5
+ import{Uniform as r}from"./Uniform.js";import{BindType as e}from"../shaderTechnique/BindType.js";class s extends r{constructor(r,s,i){switch(s){case e.Pass:return void super(r,"int",s,i?(e,s,t)=>e.setUniform1i(r,i(s,t)):null);case e.Draw:return void super(r,"int",s,i?(e,s,t)=>e.setUniform1i(r,i(s,t)):null);default:super(r,"int")}}}export{s as IntegerUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"./Uniform.js";import{BindType as s}from"../shaderTechnique/BindType.js";class e extends r{constructor(r,e,t){switch(e){case s.Draw:case s.Pass:return void super(r,"mat3",e,t?(s,e,a)=>s.setUniformMatrix3fv(r,t(e,a)):null);default:super(r,"mat3",null,null)}}}export{e as Matrix3Uniform};
5
+ import{Uniform as r}from"./Uniform.js";import{BindType as e}from"../shaderTechnique/BindType.js";class s extends r{constructor(r,s,t){switch(s){case e.Pass:return void super(r,"mat3",s,t?(e,s,n)=>e.setUniformMatrix3fv(r,t(s,n)):null);case e.Draw:return void super(r,"mat3",s,t?(e,s,n)=>e.setUniformMatrix3fv(r,t(s,n)):null);default:super(r,"mat3",null,null)}}}export{s as Matrix3Uniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as e}from"./Uniform.js";import{BindType as r}from"../shaderTechnique/BindType.js";class s extends e{constructor(e,s,l,n=null){switch(s){case r.Draw:case r.Pass:return void super(e,"sampler2D",s,l?(r,s,n)=>r.bindTexture(e,l(s,n)):null,n);default:super(e,"sampler2D",null,null,n)}}}export{s as Texture2DUniform};
5
+ import{isSome as r}from"../../../../../core/maybe.js";import{s}from"../../../../../chunks/vec2.js";import{Z as e,a as t}from"../../../../../chunks/vec2f64.js";import{Float2Uniform as o}from"./Float2Uniform.js";import{Uniform as n}from"./Uniform.js";import{BindType as i}from"../shaderTechnique/BindType.js";class a extends n{constructor(r,s,e){switch(s){case i.Pass:case i.Draw:return void super(r,"sampler2D",s,e?(s,t,o)=>s.bindTexture(r,e(t,o)):null);case i.Material:return void super(r,"sampler2D",s,e?(s,t,o)=>s.bindTexture(r,e(t,o)):null);default:super(r,"sampler2D")}}}function c(t,n,c,u){const p=(i.Pass,[new a(t,n,c)]);if(u){const a=t+"Size",u=(t,o)=>{const n=c(t,o);return r(n)?s(m,n.descriptor.width,n.descriptor.height):e};p.push((i.Pass,new o(a,n,u)))}return p}const m=t();export{a as Texture2DUniform,c as createTexture2DSizeUniforms};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{BindType as e}from"../shaderTechnique/BindType.js";class i{constructor(i,s,t,r,a=null){this.name=i,this.type=s,this.arraySize=a,this.bind={[e.Pass]:null,[e.Draw]:null},this.bind[t]=r}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}export{i as Uniform};
5
+ import{BindType as e}from"../shaderTechnique/BindType.js";class i{constructor(i,t,a,r,s=null){this.name=i,this.type=t,this.arraySize=s,this.bind={[e.Pass]:null,[e.Draw]:null,[e.Material]:null},this.bind[a]=r}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}export{i as Uniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- var a;!function(a){a[a.Pass=0]="Pass",a[a.Draw=1]="Draw"}(a||(a={}));export{a as BindType};
5
+ var a;!function(a){a[a.Pass=0]="Pass",a[a.Draw=1]="Draw",a[a.Material=2]="Material"}(a||(a={}));export{a as BindType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{releaseMaybe as e,isSome as t,isNone as r}from"../../../../core/maybe.js";import{isPromiseLike as i}from"../../../../core/promiseUtils.js";import{ResourceState as s}from"./basicInterfaces.js";import u from"./GLMaterial.js";class x extends u{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textureRepository=e.textureRep,this._textureId=e.textureId,this._acquire(e.textureId,(e=>this._texture=e)),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){this._texture=e(this._texture),this._textureNormal=e(this._textureNormal),this._textureEmissive=e(this._textureEmissive),this._textureOcclusion=e(this._textureOcclusion),this._textureMetallicRoughness=e(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?s.LOADED:s.LOADING}get passParameters(){return{texture:t(this._texture)?this._texture.glTexture:null,textureNormal:t(this._textureNormal)?this._textureNormal.glTexture:null,textureEmissive:t(this._textureEmissive)?this._textureEmissive.glTexture:null,textureOcclusion:t(this._textureOcclusion)?this._textureOcclusion.glTexture:null,textureMetallicRoughness:t(this._textureMetallicRoughness)?this._textureMetallicRoughness.glTexture:null}}updateTexture(t){(r(this._texture)||t!==this._texture.id)&&(this._texture=e(this._texture),this._textureId=t,this._acquire(this._textureId,(e=>this._texture=e)))}_acquire(t,s){if(r(t))return void s(null);const u=this._textureRepository.acquire(t);if(i(u))return++this._numLoading,void u.then((t=>{if(this._disposed)return e(t),void s(null);s(t)})).finally((()=>--this._numLoading));s(u)}}function o(e,r){t(r.texture)&&e.bindTexture("tex",r.texture),t(r.textureNormal)&&e.bindTexture("normalTexture",r.textureNormal),t(r.textureEmissive)&&e.bindTexture("texEmission",r.textureEmissive),t(r.textureOcclusion)&&e.bindTexture("texOcclusion",r.textureOcclusion),t(r.textureMetallicRoughness)&&e.bindTexture("texMetallicRoughness",r.textureMetallicRoughness)}function l(e,r){t(r.texture)&&r.texture.descriptor.textureCoordinateScaleFactor?e.setUniform2fv("textureCoordinateScaleFactor",r.texture.descriptor.textureCoordinateScaleFactor):e.setUniform2f("textureCoordinateScaleFactor",1,1)}export{x as GLTextureMaterial,o as bindTextureMaterialPass,l as bindTextureMaterialScale};
5
+ import{releaseMaybe as t,isSome as e,isNone as s}from"../../../../core/maybe.js";import{isPromiseLike as i}from"../../../../core/promiseUtils.js";import{NoParameters as r}from"../core/shaderModules/interfaces.js";import{ResourceState as u}from"./basicInterfaces.js";import h from"./GLMaterial.js";class o extends h{constructor(t){super(t),this._numLoading=0,this._disposed=!1,this._textureRepository=t.textureRep,this._textureId=t.textureId,this._acquire(t.textureId,(t=>this._texture=t)),this._acquire(t.normalTextureId,(t=>this._textureNormal=t)),this._acquire(t.emissiveTextureId,(t=>this._textureEmissive=t)),this._acquire(t.occlusionTextureId,(t=>this._textureOcclusion=t)),this._acquire(t.metallicRoughnessTextureId,(t=>this._textureMetallicRoughness=t))}dispose(){this._texture=t(this._texture),this._textureNormal=t(this._textureNormal),this._textureEmissive=t(this._textureEmissive),this._textureOcclusion=t(this._textureOcclusion),this._textureMetallicRoughness=t(this._textureMetallicRoughness),this._disposed=!0}ensureResources(t){return 0===this._numLoading?u.LOADED:u.LOADING}get passParameters(){return new x(e(this._texture)?this._texture.glTexture:null,e(this._textureNormal)?this._textureNormal.glTexture:null,e(this._textureEmissive)?this._textureEmissive.glTexture:null,e(this._textureOcclusion)?this._textureOcclusion.glTexture:null,e(this._textureMetallicRoughness)?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){(s(this._texture)||e!==this._texture.id)&&(this._texture=t(this._texture),this._textureId=e,this._acquire(this._textureId,(t=>this._texture=t)))}_acquire(e,r){if(s(e))return void r(null);const u=this._textureRepository.acquire(e);if(i(u))return++this._numLoading,void u.then((e=>{if(this._disposed)return t(e),void r(null);r(e)})).finally((()=>--this._numLoading));r(u)}}class x extends r{constructor(t,e,s,i,r){super(),this.texture=t,this.textureNormal=e,this.textureEmissive=s,this.textureOcclusion=i,this.textureMetallicRoughness=r}}export{o as GLTextureMaterial,x as GLTextureMaterialBindParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as t,isSome as e}from"../../../../core/maybe.js";import r from"../../../../core/PooledArray.js";import{BindType as i}from"../core/shaderTechnique/BindType.js";import{webglDebugEnabled as s}from"../../../webgl/checkWebGLError.js";class o{constructor(t,e,o){this._context=t,this._locations=o,this._textures=new Map,this._freeTextureUnits=new r({deallocator:null}),this._glProgram=t.programCache.acquire(e.generate("vertex"),e.generate("fragment"),o),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=e.generateBind(i.Pass,this),this.bindDraw=e.generateBind(i.Draw,this),this._fragmentUniforms=s()?e.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get isCompiled(){return this._glProgram.isCompiled}setUniform1b(t,e){this._glProgram.setUniform1i(t,e?1:0)}setUniform1i(t,e){this._glProgram.setUniform1i(t,e)}setUniform1f(t,e){this._glProgram.setUniform1f(t,e)}setUniform2f(t,e,r){this._glProgram.setUniform2f(t,e,r)}setUniform2fv(t,e){this._glProgram.setUniform2fv(t,e)}setUniform3f(t,e,r,i){this._glProgram.setUniform3f(t,e,r,i)}setUniform3fv(t,e){this._glProgram.setUniform3fv(t,e)}setUniform4f(t,e,r,i,s){this._glProgram.setUniform4f(t,e,r,i,s)}setUniform4fv(t,e){this._glProgram.setUniform4fv(t,e)}setUniformMatrix3fv(t,e){this._glProgram.setUniformMatrix3fv(t,e)}setUniformMatrix4fv(t,e){this._glProgram.setUniformMatrix4fv(t,e)}setUniform1fv(t,e){this._glProgram.setUniform1fv(t,e)}setUniform1iv(t,e){this._glProgram.setUniform1iv(t,e)}setUniform2iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform3iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform4iv(t,e){this._glProgram.setUniform4iv(t,e)}assertCompatibleVertexAttributeLocations(t){t.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,r){if(t(r)||null==r.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let i=this._textures.get(e);return null==i?(i=this._allocTextureUnit(r),this._textures.set(e,i)):i.texture=r,this._context.useProgram(this),this.setUniform1i(e,i.unit),this._context.bindTexture(r,i.unit),i.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((t,e)=>{this._context.bindTexture(t.texture,t.unit),this.setUniform1i(e,t.unit)})),e(this._fragmentUniforms)&&this._fragmentUniforms.forEach((t=>{"sampler2D"!==t.type&&"samplerCube"!==t.type||this._textures.has(t.name)||console.error(`Texture sampler ${t.name} has no bound texture`)}))}_allocTextureUnit(t){return{texture:t,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(t){this._freeTextureUnits.push(t.unit)}}export{o as Program};
5
+ import{isNone as t,isSome as e}from"../../../../core/maybe.js";import r from"../../../../core/PooledArray.js";import{BindType as i}from"../core/shaderTechnique/BindType.js";import{webglDebugEnabled as s}from"../../../webgl/checkWebGLError.js";class o{constructor(t,e,o){this._context=t,this._locations=o,this._textures=new Map,this._freeTextureUnits=new r({deallocator:null}),this._glProgram=t.programCache.acquire(e.generate("vertex"),e.generate("fragment"),o),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=e.generateBind(i.Pass,this),this.bindDraw=e.generateBind(i.Draw,this),this.bindMaterial=e.generateBind(i.Material,this),this._fragmentUniforms=s()?e.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get isCompiled(){return this._glProgram.isCompiled}setUniform1b(t,e){this._glProgram.setUniform1i(t,e?1:0)}setUniform1i(t,e){this._glProgram.setUniform1i(t,e)}setUniform1f(t,e){this._glProgram.setUniform1f(t,e)}setUniform2f(t,e,r){this._glProgram.setUniform2f(t,e,r)}setUniform2fv(t,e){this._glProgram.setUniform2fv(t,e)}setUniform3f(t,e,r,i){this._glProgram.setUniform3f(t,e,r,i)}setUniform3fv(t,e){this._glProgram.setUniform3fv(t,e)}setUniform4f(t,e,r,i,s){this._glProgram.setUniform4f(t,e,r,i,s)}setUniform4fv(t,e){this._glProgram.setUniform4fv(t,e)}setUniformMatrix3fv(t,e){this._glProgram.setUniformMatrix3fv(t,e)}setUniformMatrix4fv(t,e){this._glProgram.setUniformMatrix4fv(t,e)}setUniform1fv(t,e){this._glProgram.setUniform1fv(t,e)}setUniform1iv(t,e){this._glProgram.setUniform1iv(t,e)}setUniform2iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform3iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform4iv(t,e){this._glProgram.setUniform4iv(t,e)}assertCompatibleVertexAttributeLocations(t){t.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,r){if(t(r)||null==r.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let i=this._textures.get(e);return null==i?(i=this._allocTextureUnit(r),this._textures.set(e,i)):i.texture=r,this._context.useProgram(this),this.setUniform1i(e,i.unit),this._context.bindTexture(r,i.unit),i.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((t,e)=>{this._context.bindTexture(t.texture,t.unit),this.setUniform1i(e,t.unit)})),e(this._fragmentUniforms)&&this._fragmentUniforms.forEach((t=>{"sampler2D"!==t.type&&"samplerCube"!==t.type||this._textures.has(t.name)||console.error(`Texture sampler ${t.name} has no bound texture`)}))}_allocTextureUnit(t){return{texture:t,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(t){this._freeTextureUnits.push(t.unit)}}export{o as Program};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{c as i,g as t,a as n}from"../../../../chunks/vec3.js";import{c as s,f as r}from"../../../../chunks/vec3f64.js";import{SphericalHarmonicsAmbientLight as o}from"./Lightsources.js";import{combineLights as h}from"./SphericalHarmonics.js";class e{constructor(){this._shOrder=2,this._ambientBoost=.4,this._oldSunlight={direction:s(),ambient:{color:s(),intensity:1},diffuse:{color:s(),intensity:1}},this.globalFactor=.5,this.groundLightingFactor=.5,this._sphericalHarmonics=new o,this._mainLight={intensity:s(),direction:r(1,0,0),castShadows:!1,specularStrength:1,environmentStrength:1}}get lightingMainDirection(){return this._mainLight.direction}setLightDirectionUniform(i){i.setUniform3fv("lightingMainDirection",this._mainLight.direction)}setUniforms(i,t,n){const s=t?(1-this.groundLightingFactor)*(1-this.globalFactor):0;i.setUniform1f("lightingFixedFactor",s),i.setUniform1f("lightingGlobalFactor",this.globalFactor),this.setLightDirectionUniform(i),i.setUniform3fv("lightingMainIntensity",this._mainLight.intensity),i.setUniform1f("lightingSpecularStrength",this._mainLight.specularStrength),i.setUniform1f("lightingEnvironmentStrength",this._mainLight.environmentStrength),i.setUniform1f("ambientBoostFactor",this._ambientBoost),i.setUniform1b("hasFillLights",n);const r=this._sphericalHarmonics;0===this._shOrder?i.setUniform3f("lightingAmbientSH0",r.r[0],r.g[0],r.b[0]):1===this._shOrder?(i.setUniform4f("lightingAmbientSH_R",r.r[0],r.r[1],r.r[2],r.r[3]),i.setUniform4f("lightingAmbientSH_G",r.g[0],r.g[1],r.g[2],r.g[3]),i.setUniform4f("lightingAmbientSH_B",r.b[0],r.b[1],r.b[2],r.b[3])):2===this._shOrder&&(i.setUniform3f("lightingAmbientSH0",r.r[0],r.g[0],r.b[0]),i.setUniform4f("lightingAmbientSH_R1",r.r[1],r.r[2],r.r[3],r.r[4]),i.setUniform4f("lightingAmbientSH_G1",r.g[1],r.g[2],r.g[3],r.g[4]),i.setUniform4f("lightingAmbientSH_B1",r.b[1],r.b[2],r.b[3],r.b[4]),i.setUniform4f("lightingAmbientSH_R2",r.r[5],r.r[6],r.r[7],r.r[8]),i.setUniform4f("lightingAmbientSH_G2",r.g[5],r.g[6],r.g[7],r.g[8]),i.setUniform4f("lightingAmbientSH_B2",r.b[5],r.b[6],r.b[7],r.b[8]))}set(s){h(s,this._shOrder,this._mainLight,this._sphericalHarmonics),i(this._oldSunlight.direction,this._mainLight.direction);const r=1/Math.PI;this._oldSunlight.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*r,this._oldSunlight.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*r,this._oldSunlight.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*r,t(this._oldSunlight.diffuse.color,this._mainLight.intensity,r),i(g,this._oldSunlight.diffuse.color),t(g,g,this._ambientBoost*this.globalFactor),n(this._oldSunlight.ambient.color,this._oldSunlight.ambient.color,g)}get old(){return this._oldSunlight}}const g=s();export{e as SceneLighting};
5
+ import{c as i,g as t,a as n}from"../../../../chunks/vec3.js";import{c as r,f as s}from"../../../../chunks/vec3f64.js";import{SphericalHarmonicsAmbientLight as o}from"./Lightsources.js";import{combineLights as h}from"./SphericalHarmonics.js";class e{constructor(){this._shOrder=2,this._ambientBoost=.4,this._oldSunlight={direction:r(),ambient:{color:r(),intensity:1},diffuse:{color:r(),intensity:1}},this.globalFactor=.5,this.groundLightingFactor=.5,this._sphericalHarmonics=new o,this._mainLight={intensity:r(),direction:s(1,0,0),castShadows:!1,specularStrength:1,environmentStrength:1}}get lightingMainDirection(){return this._mainLight.direction}setLightDirectionUniform(i){i.setUniform3fv("lightingMainDirection",this._mainLight.direction)}setUniforms(i,t){const n=t?(1-this.groundLightingFactor)*(1-this.globalFactor):0;i.setUniform1f("lightingFixedFactor",n),i.setUniform1f("lightingGlobalFactor",this.globalFactor),this.setLightDirectionUniform(i),i.setUniform3fv("lightingMainIntensity",this._mainLight.intensity),i.setUniform1f("lightingSpecularStrength",this._mainLight.specularStrength),i.setUniform1f("lightingEnvironmentStrength",this._mainLight.environmentStrength),i.setUniform1f("ambientBoostFactor",this._ambientBoost);const r=this._sphericalHarmonics;0===this._shOrder?i.setUniform3f("lightingAmbientSH0",r.r[0],r.g[0],r.b[0]):1===this._shOrder?(i.setUniform4f("lightingAmbientSH_R",r.r[0],r.r[1],r.r[2],r.r[3]),i.setUniform4f("lightingAmbientSH_G",r.g[0],r.g[1],r.g[2],r.g[3]),i.setUniform4f("lightingAmbientSH_B",r.b[0],r.b[1],r.b[2],r.b[3])):2===this._shOrder&&(i.setUniform3f("lightingAmbientSH0",r.r[0],r.g[0],r.b[0]),i.setUniform4f("lightingAmbientSH_R1",r.r[1],r.r[2],r.r[3],r.r[4]),i.setUniform4f("lightingAmbientSH_G1",r.g[1],r.g[2],r.g[3],r.g[4]),i.setUniform4f("lightingAmbientSH_B1",r.b[1],r.b[2],r.b[3],r.b[4]),i.setUniform4f("lightingAmbientSH_R2",r.r[5],r.r[6],r.r[7],r.r[8]),i.setUniform4f("lightingAmbientSH_G2",r.g[5],r.g[6],r.g[7],r.g[8]),i.setUniform4f("lightingAmbientSH_B2",r.b[5],r.b[6],r.b[7],r.b[8]))}set(r){h(r,this._shOrder,this._mainLight,this._sphericalHarmonics),i(this._oldSunlight.direction,this._mainLight.direction);const s=1/Math.PI;this._oldSunlight.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*s,this._oldSunlight.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*s,this._oldSunlight.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*s,t(this._oldSunlight.diffuse.color,this._mainLight.intensity,s),i(g,this._oldSunlight.diffuse.color),t(g,g,this._ambientBoost*this.globalFactor),n(this._oldSunlight.ambient.color,this._oldSunlight.ambient.color,g)}get old(){return this._oldSunlight}}const g=r();export{e as SceneLighting};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/mat3f64.js";import{s as r,c as s,n as i,b as a,l as n,g as o,e as h,t as l}from"../../../../chunks/vec3.js";import{c,f as u}from"../../../../chunks/vec3f64.js";import{ViewingMode as m}from"../../../ViewingMode.js";import{newLayout as p}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as d}from"../core/shaderLibrary/ShaderOutputOptions.js";import{NormalAttributeType as f}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{VertexNormalPassParameters as v}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{NormalsDoubleSidedMode as g}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as T}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{defaultMaskAlphaCutoff as C}from"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import{CullFaceOptions as S,DepthTestFunction as b,AlphaDiscardMode as A}from"../lib/basicInterfaces.js";import{hasEnabledSSAO as O,hasEnabledShadowMap as x}from"../lib/BindParameters.js";import{GLTextureMaterial as M}from"../lib/GLTextureMaterial.js";import{DefaultMaterialParameters as L,Material as q}from"../lib/Material.js";import{OITPolygonOffsetLimit as P}from"../lib/OrderIndependentTransparency.js";import{RenderPass as I}from"../lib/RenderPass.js";import{RenderSlot as y}from"../lib/RenderSlot.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as D}from"../lib/verticalOffsetUtils.js";import{writeDefaultAttributes as R}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as _,intersectTriangleGeometry as j}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as w}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as N}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as B}from"../shaders/RealisticTreeTechnique.js";class V extends q{constructor(e){super(e,H),this.supportsEdges=!0,this.techniqueConfig=new N,this.vertexBufferLayout=F(this.parameters),this.instanceBufferLayout=e.instanced?k(this.parameters):null}isVisibleInPass(e){return e!==I.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==I.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==I.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{instanced:t,hasVertexColors:r,hasSymbolColors:s,vvColorEnabled:i}=e,a=!!t&&t.includes("color"),n="replace"===e.colorMixMode,o=e.opacity>0,h=e.externalColor&&e.externalColor[3]>0;return r&&(a||i||s)?!!n||o:r?n?h:o:a||i||s?!!n||o:n?h:o}getConfiguration(t,r){return this.techniqueConfig.output=t,this.techniqueConfig.hasNormalTexture=!!this.parameters.normalTextureId,this.techniqueConfig.hasColorTexture=!!this.parameters.textureId,this.techniqueConfig.hasVertexTangents=this.parameters.hasVertexTangents,this.techniqueConfig.instanced=!!this.parameters.instanced,this.techniqueConfig.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.hasVerticalOffset=null!==this.parameters.verticalOffset,this.techniqueConfig.hasScreenSizePerspective=null!==this.parameters.screenSizePerspective,this.techniqueConfig.hasSlicePlane=this.parameters.hasSlicePlane,this.techniqueConfig.hasSliceHighlight=this.parameters.hasSliceHighlight,this.techniqueConfig.alphaDiscardMode=this.parameters.textureAlphaMode,this.techniqueConfig.normalType="screenDerivative"===this.parameters.normals?f.ScreenDerivative:f.Attribute,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,e(this.parameters.customDepthTest)&&(this.techniqueConfig.customDepthTest=this.parameters.customDepthTest),this.techniqueConfig.hasOccludees=this.parameters.hasOccludees,this.techniqueConfig.cullFace=this.parameters.hasSlicePlane?S.None:this.parameters.cullFace,this.techniqueConfig.hasMultipassTerrain=r.multipassTerrain.enabled,this.techniqueConfig.cullAboveGround=r.multipassTerrain.cullAboveGround,this.techniqueConfig.hasModelTransformation=e(this.parameters.modelTransformation),t!==d.Color&&t!==d.Alpha||(this.techniqueConfig.hasVertexColors=this.parameters.hasVertexColors,this.techniqueConfig.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this.techniqueConfig.doubleSidedMode=g.WindingOrder:this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?g.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?g.WindingOrder:g.None,this.techniqueConfig.instancedColor=!!this.parameters.instanced&&this.parameters.instanced.includes("color"),this.techniqueConfig.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this.techniqueConfig.receiveAmbientOcclusion=!!O(r)&&this.parameters.receiveSSAO,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this.techniqueConfig.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?T.Schematic:T.Normal:T.Disabled,this.techniqueConfig.hasMetalnessAndRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this.techniqueConfig.hasEmissionTexture=!!this.parameters.emissiveTextureId,this.techniqueConfig.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this.techniqueConfig.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this.techniqueConfig.transparencyPassType=r.transparencyPassType,this.techniqueConfig.enableOffset=r.camera.relativeElevation<P),this.techniqueConfig}intersect(e,t,c,u,p,d,f){if(null!==this.parameters.verticalOffset){const e=u.camera;r(K,c[12],c[13],c[14]);let t=null;switch(u.viewingMode){case m.Global:t=i(Y,K);break;case m.Local:t=s(Y,Q)}let f=0;if(null!==this.parameters.verticalOffset){const r=a(X,K,e.eye),s=n(r),i=o(r,r,1/s);let l=null;this.parameters.screenSizePerspective&&(l=h(t,i)),f+=_(e,s,this.parameters.verticalOffset,l,this.parameters.screenSizePerspective)}o(t,t,f),l(J,t,u.transform.inverseRotation),p=a(U,p,J),d=a(W,d,J)}j(e,t,u,p,d,D(u.verticalOffset),f)}requiresSlot(e){return e===(this.parameters.transparent?this.parameters.writeDepth?y.TRANSPARENT_MATERIAL:y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:y.OPAQUE_MATERIAL)||e===y.DRAPED_MATERIAL}createGLMaterial(e){return e.output===d.Color||e.output===d.Alpha||e.output===d.Depth||e.output===d.Normal||e.output===d.Shadow||e.output===d.Highlight?new z(e):null}createBufferWriter(){return new G(this.vertexBufferLayout,this.instanceBufferLayout)}}class z extends M{constructor(e){super({...e,...e.material.parameters})}_updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this._material.setParameters(this.passParameters),this.ensureTechnique(t.treeRendering?B:w,e)}_updateShadowState(e){x(e)!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:x(e)})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){return this._output!==d.Color&&this._output!==d.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this._updateParameters(e)}}const H={textureId:void 0,initTextureTransparent:!1,isSchematic:!1,usePBR:!1,normalTextureId:void 0,hasVertexTangents:!1,occlusionTextureId:void 0,emissiveTextureId:void 0,metallicRoughnessTextureId:void 0,emissiveFactor:[0,0,0],mrrFactors:[0,1,.5],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],externalColor:[1,1,1,1],colorMixMode:"multiply",opacity:1,layerOpacity:1,hasVertexColors:!1,hasSymbolColors:!1,doubleSided:!1,doubleSidedType:"normal",cullFace:S.Back,instanced:void 0,instancedDoublePrecision:!1,normals:"default",receiveSSAO:!0,enableFillLights:!0,receiveShadows:!0,castShadows:!0,shadowMappingEnabled:!1,verticalOffset:null,screenSizePerspective:null,hasSlicePlane:!1,hasSliceHighlight:!0,offsetTransparentBackfaces:!1,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvSizeValue:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:t(),modelTransformation:null,transparent:!1,writeDepth:!0,customDepthTest:b.Less,textureAlphaMode:A.Blend,textureAlphaCutoff:C,textureAlphaPremultiplied:!1,hasOccludees:!1,...new v,...L};class G{constructor(e,t){this.vertexBufferLayout=e,this.instanceBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(E.POSITION).length}write(e,t,r,s){R(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,s)}}function F(e){const t=e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId,r=p().vec3f(E.POSITION).vec3f(E.NORMAL);return e.hasVertexTangents&&r.vec4f(E.TANGENT),t&&r.vec2f(E.UV0),e.hasVertexColors&&r.vec4u8(E.COLOR),e.hasSymbolColors&&r.vec4u8(E.SYMBOLCOLOR),r}function k(e){let t=p();return t=e.instancedDoublePrecision?t.vec3f(E.MODELORIGINHI).vec3f(E.MODELORIGINLO).mat3f(E.MODEL).mat3f(E.MODELNORMAL):t.mat4f(E.MODEL).mat4f(E.MODELNORMAL),e.instanced&&e.instanced.includes("color")&&(t=t.vec4f(E.INSTANCECOLOR)),e.instanced&&e.instanced.includes("featureAttribute")&&(t=t.vec4f(E.INSTANCEFEATUREATTRIBUTE)),t}const U=c(),W=c(),Q=u(0,0,1),Y=c(),J=c(),K=c(),X=c();export{z as DefaultGLMaterial,V as DefaultMaterial,k as getInstanceBufferLayout};
5
+ import{isSome as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/mat3f64.js";import{s as r,c as s,n as i,b as a,l as n,g as o,e as h,t as l}from"../../../../chunks/vec3.js";import{c,f as u}from"../../../../chunks/vec3f64.js";import{ViewingMode as m}from"../../../ViewingMode.js";import{newLayout as p}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as d}from"../core/shaderLibrary/ShaderOutputOptions.js";import{NormalAttributeType as f}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{VertexNormalPassParameters as v}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{NormalsDoubleSidedMode as g}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as T}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{defaultMaskAlphaCutoff as C}from"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import{CullFaceOptions as S,DepthTestFunction as b,AlphaDiscardMode as A}from"../lib/basicInterfaces.js";import{hasEnabledSSAO as O,hasEnabledShadowMap as x}from"../lib/BindParameters.js";import{GLTextureMaterial as M}from"../lib/GLTextureMaterial.js";import{DefaultMaterialParameters as L,Material as q}from"../lib/Material.js";import{OITPolygonOffsetLimit as P}from"../lib/OrderIndependentTransparency.js";import{RenderPass as I}from"../lib/RenderPass.js";import{RenderSlot as y}from"../lib/RenderSlot.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as D}from"../lib/verticalOffsetUtils.js";import{writeDefaultAttributes as R}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as _,intersectTriangleGeometry as j}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as w}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as N}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as B}from"../shaders/RealisticTreeTechnique.js";class V extends q{constructor(e){super(e,H),this.supportsEdges=!0,this.techniqueConfig=new N,this.vertexBufferLayout=k(this.parameters),this.instanceBufferLayout=e.instanced?F(this.parameters):null}isVisibleInPass(e){return e!==I.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==I.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==I.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const{instanced:t,hasVertexColors:r,hasSymbolColors:s,vvColorEnabled:i}=e,a=!!t&&t.includes("color"),n="replace"===e.colorMixMode,o=e.opacity>0,h=e.externalColor&&e.externalColor[3]>0;return r&&(a||i||s)?!!n||o:r?n?h:o:a||i||s?!!n||o:n?h:o}getConfiguration(t,r){return this.techniqueConfig.output=t,this.techniqueConfig.hasNormalTexture=!!this.parameters.normalTextureId,this.techniqueConfig.hasColorTexture=!!this.parameters.textureId,this.techniqueConfig.hasVertexTangents=this.parameters.hasVertexTangents,this.techniqueConfig.instanced=!!this.parameters.instanced,this.techniqueConfig.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.hasVerticalOffset=null!==this.parameters.verticalOffset,this.techniqueConfig.hasScreenSizePerspective=null!==this.parameters.screenSizePerspective,this.techniqueConfig.hasSlicePlane=this.parameters.hasSlicePlane,this.techniqueConfig.hasSliceHighlight=this.parameters.hasSliceHighlight,this.techniqueConfig.alphaDiscardMode=this.parameters.textureAlphaMode,this.techniqueConfig.normalType="screenDerivative"===this.parameters.normals?f.ScreenDerivative:f.Attribute,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,e(this.parameters.customDepthTest)&&(this.techniqueConfig.customDepthTest=this.parameters.customDepthTest),this.techniqueConfig.hasOccludees=this.parameters.hasOccludees,this.techniqueConfig.cullFace=this.parameters.hasSlicePlane?S.None:this.parameters.cullFace,this.techniqueConfig.hasMultipassTerrain=r.multipassTerrain.enabled,this.techniqueConfig.cullAboveGround=r.multipassTerrain.cullAboveGround,this.techniqueConfig.hasModelTransformation=e(this.parameters.modelTransformation),t!==d.Color&&t!==d.Alpha||(this.techniqueConfig.hasVertexColors=this.parameters.hasVertexColors,this.techniqueConfig.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this.techniqueConfig.doubleSidedMode=g.WindingOrder:this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?g.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?g.WindingOrder:g.None,this.techniqueConfig.instancedColor=!!this.parameters.instanced&&this.parameters.instanced.includes("color"),this.techniqueConfig.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this.techniqueConfig.receiveAmbientOcclusion=!!O(r)&&this.parameters.receiveSSAO,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this.techniqueConfig.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?T.Schematic:T.Normal:T.Disabled,this.techniqueConfig.hasMetalnessAndRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this.techniqueConfig.hasEmissionTexture=!!this.parameters.emissiveTextureId,this.techniqueConfig.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this.techniqueConfig.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this.techniqueConfig.transparencyPassType=r.transparencyPassType,this.techniqueConfig.enableOffset=r.camera.relativeElevation<P),this.techniqueConfig}intersect(e,t,c,u,p,d,f){if(null!==this.parameters.verticalOffset){const e=u.camera;r(K,c[12],c[13],c[14]);let t=null;switch(u.viewingMode){case m.Global:t=i(Y,K);break;case m.Local:t=s(Y,Q)}let f=0;if(null!==this.parameters.verticalOffset){const r=a(X,K,e.eye),s=n(r),i=o(r,r,1/s);let l=null;this.parameters.screenSizePerspective&&(l=h(t,i)),f+=_(e,s,this.parameters.verticalOffset,l,this.parameters.screenSizePerspective)}o(t,t,f),l(J,t,u.transform.inverseRotation),p=a(U,p,J),d=a(W,d,J)}j(e,t,u,p,d,D(u.verticalOffset),f)}requiresSlot(e){return e===(this.parameters.transparent?this.parameters.writeDepth?y.TRANSPARENT_MATERIAL:y.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:y.OPAQUE_MATERIAL)||e===y.DRAPED_MATERIAL}createGLMaterial(e){return e.output===d.Color||e.output===d.Alpha||e.output===d.Depth||e.output===d.Normal||e.output===d.Shadow||e.output===d.Highlight?new z(e):null}createBufferWriter(){return new G(this.vertexBufferLayout,this.instanceBufferLayout)}}class z extends M{constructor(e){super({...e,...e.material.parameters})}_updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this._material.setParameters(this.passParameters),this.ensureTechnique(t.treeRendering?B:w,e)}_updateShadowState(e){x(e)!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:x(e)})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){return this._output!==d.Color&&this._output!==d.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this._updateParameters(e)}}const H={textureId:void 0,initTextureTransparent:!1,isSchematic:!1,usePBR:!1,normalTextureId:void 0,hasVertexTangents:!1,occlusionTextureId:void 0,emissiveTextureId:void 0,metallicRoughnessTextureId:void 0,emissiveFactor:[0,0,0],mrrFactors:[0,1,.5],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],externalColor:[1,1,1,1],colorMixMode:"multiply",opacity:1,layerOpacity:1,hasVertexColors:!1,hasSymbolColors:!1,doubleSided:!1,doubleSidedType:"normal",cullFace:S.Back,instanced:void 0,instancedDoublePrecision:!1,normals:"default",receiveSSAO:!0,receiveShadows:!0,castShadows:!0,shadowMappingEnabled:!1,verticalOffset:null,screenSizePerspective:null,hasSlicePlane:!1,hasSliceHighlight:!0,offsetTransparentBackfaces:!1,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvSizeValue:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:t(),modelTransformation:null,transparent:!1,writeDepth:!0,customDepthTest:b.Less,textureAlphaMode:A.Blend,textureAlphaCutoff:C,textureAlphaPremultiplied:!1,hasOccludees:!1,...new v,...L};class G{constructor(e,t){this.vertexBufferLayout=e,this.instanceBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(E.POSITION).length}write(e,t,r,s){R(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,s)}}function k(e){const t=e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId,r=p().vec3f(E.POSITION).vec3f(E.NORMAL);return e.hasVertexTangents&&r.vec4f(E.TANGENT),t&&r.vec2f(E.UV0),e.hasVertexColors&&r.vec4u8(E.COLOR),e.hasSymbolColors&&r.vec4u8(E.SYMBOLCOLOR),r}function F(e){let t=p();return t=e.instancedDoublePrecision?t.vec3f(E.MODELORIGINHI).vec3f(E.MODELORIGINLO).mat3f(E.MODEL).mat3f(E.MODELNORMAL):t.mat4f(E.MODEL).mat4f(E.MODELNORMAL),e.instanced&&e.instanced.includes("color")&&(t=t.vec4f(E.INSTANCECOLOR)),e.instanced&&e.instanced.includes("featureAttribute")&&(t=t.vec4f(E.INSTANCEFEATUREATTRIBUTE)),t}const U=c(),W=c(),Q=u(0,0,1),Y=c(),J=c(),K=c(),X=c();export{z as DefaultGLMaterial,V as DefaultMaterial,F as getInstanceBufferLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{BindType as o}from"../core/shaderTechnique/BindType.js";import{parameter as i,ShaderTechniqueConfiguration as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{}e([i({constValue:!0})],t.prototype,"hasSliceHighlight",void 0),e([i({constValue:!1})],t.prototype,"hasSliceInVertexProgram",void 0),e([i({constValue:o.Draw})],t.prototype,"slicePlaneBindType",void 0),e([i({constValue:!1})],t.prototype,"instancedDoublePrecision",void 0);export{t as DefaultTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{BindType as o}from"../core/shaderTechnique/BindType.js";import{parameter as t,ShaderTechniqueConfiguration as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends i{}e([t({constValue:!0})],r.prototype,"hasSliceHighlight",void 0),e([t({constValue:!1})],r.prototype,"hasSliceInVertexProgram",void 0),e([t({constValue:!1})],r.prototype,"instancedDoublePrecision",void 0),e([t({constValue:o.Draw})],r.prototype,"slicePlaneBindType",void 0),e([t({constValue:o.Pass})],r.prototype,"pbrTextureBindType",void 0);export{r as DefaultTechniqueConfiguration};