/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{oitBlendFragment as o}from"../views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js";import{ShaderBuilder as r}from"../views/webgl/ShaderBuilder.js";function a(a){const n=new r;n.include(e);const{computeHudOcclusion:i,hasOpaqueEmission:s,hasEmissionAttachment:t}=a,{fragment:c,outputs:l}=n;let d=0;return l.add("fragColor","vec4",d++),s?l.add("fragEmission","vec4",d++):t&&d++,i&&l.add("fragOcclusion","vec4",d++),c.include(o,a),c.main.add("fragColor = oitBlendFragment();"),s&&c.main.add("fragEmission = vec4(0.0, 0.0, 0.0, fragColor.a);"),i&&c.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};
