/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{HighlightCellGridScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import{Float2DrawUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as l}from"../views/webgl/ShaderBuilder.js";class o extends u{constructor(){super(...arguments),this.blurSize=e()}}function n(){const e=new l;return e.include(r),e.outputs.add("fragHighlight","vec2",0),e.fragment.uniforms.add(new t("blurSize",e=>e.blurSize),new s("blurInput",e=>e.blurInput)).main.add(i`vec2 highlightTextureSize = vec2(textureSize(blurInput,0));
vec2 center = texture(blurInput, sUV).rg;
if (vOutlinePossible == 0.0) {
fragHighlight = center;
} else {
vec2 sum = center * 0.204164;
sum += texture(blurInput, sUV + blurSize * 1.407333).rg * 0.304005;
sum += texture(blurInput, sUV - blurSize * 1.407333).rg * 0.304005;
sum += texture(blurInput, sUV + blurSize * 3.294215).rg * 0.093913;
sum += texture(blurInput, sUV - blurSize * 3.294215).rg * 0.093913;
fragHighlight = sum;
}`),e}const g=Object.freeze(Object.defineProperty({__proto__:null,HighlightBlurDrawParameters:o,build:n},Symbol.toStringTag,{value:"Module"}));export{o as H,g as a,n as b};
