/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{TileBackground as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";function l(l){const t=new a,g=t.fragment;if(t.include(o),1===l.background){const r=2===l.output;return r?g.uniforms.add(new i("backgroundColor",e=>e.backgroundColor)):g.include(e),g.main.add(s`fragColor = vec4(${r?s`backgroundColor`:s`gridColor(uv)`}, 1.0);`),t}return t.include(r,l),g.uniforms.add(new d("tex",e=>e.texture),new n("opacity",e=>e.opacity)).main.add(s`fragColor = blendLayers(uv, texture(tex, uv), opacity);`),t}const t=Object.freeze(Object.defineProperty({__proto__:null,build:l},Symbol.toStringTag,{value:"Module"}));export{t as B,l as b};
