/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{oitBlendFragment as r}from"../views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js";import{ShaderBuilder as o}from"../views/webgl/ShaderBuilder.js";function a(a){const n=new o;n.include(e);const{computeHudOcclusion:i,hasOpaqueEmission:s}=a,{fragment:l,outputs:t}=n;let c=0;return t.add("fragColor","vec4",c++),s&&t.add("fragEmission","vec4",c++),i&&t.add("fragOcclusion","vec4",c++),l.include(r,a),l.main.add("fragColor = oitBlendFragment();"),s&&l.main.add("fragEmission = vec4(0.0, 0.0, 0.0, fragColor.a);"),i&&l.main.add("fragOcclusion = vec4(pow(1.0 - fragColor.a, 0.5), 0.0, 0.0, 1.0);"),n}const n=Object.freeze(Object.defineProperty({__proto__:null,build:a},Symbol.toStringTag,{value:"Module"}));export{n as O,a as b};
