/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as s}from"../views/webgl/NoParameters.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";class l extends s{}function c(){const s=new a;s.include(e);const{fragment:l,outputs:c}=s;return l.uniforms.add(new o("colorTexture",e=>e.colorTexture),new o("alphaTexture",e=>e.alphaTexture)),c.add("fragColor","vec4",0),c.add("fragEmission","vec4",1),l.main.add(r`float srcAlpha = texture(alphaTexture, uv).r;
vec4 srcColor = texture(colorTexture, uv);
srcColor.rgb = clamp(srcColor.rgb, vec3(0.0), srcColor.rgb);
vec3 dimming = srcAlpha > 1.0 ? mix(vec3(1.0), srcColor.rgb, 1.0 / srcAlpha) : mix(vec3(1.0), srcColor.rgb, srcAlpha);
fragEmission = vec4(dimming, 0.0);`),s}const t=Object.freeze(Object.defineProperty({__proto__:null,OITDimPassParameters:l,build:c},Symbol.toStringTag,{value:"Module"}));export{l as O,t as a,c as b};
