/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../../chunks/vec4","../../../../../../chunks/vec4f64","../../shaderModules/Float4PassUniform","../../shaderModules/interfaces","../../shaderModules/Texture2DPassUniform"],(function(e,t,o,r,s,a){"use strict";function l(e,o){const l=e.fragment;o.receiveAmbientOcclusion?(l.uniforms.add([new a.Texture2DPassUniform("ssaoTex",((e,t)=>t.ssaoHelper.colorTexture)),new r.Float4PassUniform("viewportPixelSz",((e,o)=>t.set(i,o.camera.fullViewport[0],o.camera.fullViewport[1],1/o.ssaoHelper.width,1/o.ssaoHelper.height)))]),l.code.add(s.glsl`float evaluateAmbientOcclusion() {
return 1.0 - texture2D(ssaoTex, (gl_FragCoord.xy - viewportPixelSz.xy) * viewportPixelSz.zw).a;
}
float evaluateAmbientOcclusionInverse() {
return texture2D(ssaoTex, (gl_FragCoord.xy - viewportPixelSz.xy) * viewportPixelSz.zw).a;
}`)):l.code.add(s.glsl`float evaluateAmbientOcclusion() { return 0.0; }
float evaluateAmbientOcclusionInverse() { return 1.0; }`)}const i=o.create();e.EvaluateAmbientOcclusion=l,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
