/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{TextureCoordinateAttribute as e}from"./TextureCoordinateAttribute.glsl.js";import{TextureAtlasLookup as t}from"../util/TextureAtlasLookup.glsl.js";import{glsl as o}from"../../shaderModules/glsl.js";function r(r,u){const{textureCoordinateType:l}=u;if(0===l||3===l)return;r.include(e,u);const s=2===l;s&&r.include(t),r.fragment.code.add(o`
    vec4 textureLookup(sampler2D tex, vec2 uv) {
      return ${s?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
    }
  `)}export{r as VertexTextureCoordinates};
