export declare const MeshFragmentShader = "\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n\nvarying vec3 outputNormal;\n\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n\n#ifdef DOUBLE_SIDED\n  varying vec3 vLightBack;\n  varying vec3 vIndirectBack;\n#endif\n\n\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvarying vec3 vViewPosition;\n#if NUM_CLIPPING_PLANES > 0\nuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n\nvoid main() {\n\n  #include <clipping_planes_fragment>\n\n  vec4 diffuseColor = vec4( diffuse, opacity );\n  ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n  vec3 totalEmissiveRadiance = emissive;\n\n  #include <logdepthbuf_fragment>\n  #include <map_fragment>\n  #include <color_fragment>\n  #include <alphamap_fragment>\n  #include <alphatest_fragment>\n  #include <specularmap_fragment>\n  #include <emissivemap_fragment>\n\n  bool backFacing = false;\n   vec3 fdx = dFdx(vViewPosition);\n   vec3 fdy = dFdy(vViewPosition);\n   vec3 faceNormal = normalize(cross(fdx,fdy));\n   backFacing = !(dot (outputNormal, faceNormal) > 0.0);\n\n  // accumulation\n  reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\n  #ifdef DOUBLE_SIDED\n\n    reflectedLight.indirectDiffuse += ( !backFacing ) ? vIndirectFront : vIndirectBack;\n\n  #else\n\n    reflectedLight.indirectDiffuse += vIndirectFront;\n\n  #endif\n\n  #include <lightmap_fragment>\n\n  reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\n  #ifdef DOUBLE_SIDED\n\n    reflectedLight.directDiffuse = ( !backFacing ) ? vLightFront : vLightBack;\n\n  #else\n\n    reflectedLight.directDiffuse = vLightFront;\n\n  #endif\n\n  reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\n  #include <aomap_fragment>\n\n  vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n  #include <envmap_fragment>\n\n  gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n  #include <tonemapping_fragment>\n  #include <encodings_fragment>\n  #include <fog_fragment>\n  #include <premultiplied_alpha_fragment>\n  #include <dithering_fragment>\n}\n";
