declare const _default: "#version 300 es\n#define SHADER_NAME texture-fragment-shader\n\nuniform sampler2D valueTexture;\nuniform sampler2D colormap;\n\nin vec3 cameraPosition;\n\nin vec4 vPosition;\nin vec3 vNormal;\nin vec2 vTexCoords;\nin vec4 vColor;\n\nout vec4 fragColor;\n\n// Normalize the value to the range [0, 1]\nfloat normalizeValue(float value) {\n   if(isNanValue(value)) {\n      return value;\n   }\n   return (value - triangles.colormapRange[0]) / (triangles.colormapRange[1] - triangles.colormapRange[0]);\n}\n   \nvec4 valueColor(float value) {\n   if(isNanValue(value) || value == triangles.undefinedValue) {\n      return triangles.undefinedColor;\n   }\n   if(triangles.useClampColors) {\n      if(value < triangles.clampRange[0]) {\n         return triangles.lowClampColor;\n      } else if(value > triangles.clampRange[1]) {\n         return triangles.highClampColor;\n      }\n   }\n   float normalizedValue = normalizeValue(value);\n   // apply colormap\n   return texture(colormap, vec2(normalizedValue, 0.0));\n}\n\nvoid main(void) {\n\n   //Picking pass.\n   if (picking.isActive > 0.5 && !(picking.isAttribute > 0.5)) {\n      float value = texture(valueTexture, vTexCoords).r;\n      float normalizedValue = normalizeValue(value);\n      fragColor = encodeNormalizedValueWithNaNToRGB(normalizedValue);\n      return;\n   }\n\n   vec3 normal = vNormal;\n\n   if (!triangles.smoothShading) {\n      normal = normalize(cross(dFdx(vPosition.xyz), dFdy(vPosition.xyz)));\n   }\n\n   vec4 color = vColor;\n   \n   // Use two sided phong lighting. This has no effect if \"material\" property is not set.\n   vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, vPosition.xyz, normal);\n\n   // get value from texture\n   float value = texture(valueTexture, vTexCoords).r;\n   // compute color\n   vec4 colormapColor = valueColor(value);\n\n   // multiply by colormap color and apply alpha\n   fragColor = vec4(lightColor * colormapColor.rgb, colormapColor.a * vColor.a);\n   DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
export default _default;
