/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{Float3BindUniform as i}from"../../shaderModules/Float3BindUniform.js";import{glsl as n}from"../../shaderModules/glsl.js";function t(n){n.uniforms.add(new i("mainLightDirection",i=>i.lighting.mainLight.direction))}function o(n){n.uniforms.add(new i("mainLightIntensity",i=>i.lighting.mainLight.intensity))}function a(i){t(i),o(i),i.code.add(n`vec3 applyShading(vec3 shadingNormal, float shadow) {
float dotVal = clamp(dot(shadingNormal, mainLightDirection), 0.0, 1.0);
return mainLightIntensity * ((1.0 - shadow) * dotVal);
}`)}export{t as addMainLightDirection,o as addMainLightIntensity,a as applyShading};
