declare const _default: "#version 300 es\n#define SHADER_NAME triangle-fragment-shader\n\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec3 worldPos;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n   vec3 normal = normals_commonspace;\n\n   if (!triangles.smoothShading) {\n      normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n   }\n\n   vec4 color = vColor;\n      \n   bool is_contours = triangles.contourReferencePoint != -1.0 && triangles.contourInterval != -1.0;\n   if (is_contours) {\n      // Contours are made of either depths or properties.\n      float val = (abs(worldPos.z) - triangles.contourReferencePoint) / triangles.contourInterval;\n\n      float f  = fract(val);\n      float df = fwidth(val);\n\n      // keep: float c = smoothstep(df * 1.0, df * 2.0, f); // smoothstep from/to no of pixels distance from contour line.\n      float c = smoothstep(0.0, df * 2.0, f);\n\n      color = color * vec4(c, c, c, 1.0);\n   }\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, position_commonspace.xyz, normal);\n   fragColor = vec4(lightColor, vColor.a);\n   DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n";
export default _default;
