fragmentMapShaderText :: JSString
fragmentMapShaderText =
    [jsstring|
      precision mediump float;
      uniform sampler2D uSampler;
      uniform float uTexOpacity;
      varying vec2 vTextureCoord;
      varying vec3 vDist;
      void main(void) {
        mediump float fade = clamp(#{x} - dot(vDist,vDist), 0.0, 1.0) * uTexOpacity;
        gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)) * fade;
      }
    |]
  where
   x = toJSString $ show fadeConst
fragmentMapShaderText :: JSString
fragmentMapShaderText =
    [jsstring|
      precision mediump float;
      uniform sampler2D uSampler;
      uniform float uTexOpacity;
      varying vec2 vTextureCoord;
      varying vec3 vDist;
      void main(void) {
        mediump float fade = clamp(#{x} - dot(vDist,vDist), 0.0, 1.0) * uTexOpacity;
        gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)) * fade;
      }
    |]
  where
   x = toJSString $ show fadeConst
fragmentMapShaderText =
    [jsstring|
      precision mediump float;
      uniform sampler2D uSampler;
      uniform float uTexOpacity;
      varying vec2 vTextureCoord;
      varying vec3 vDist;
      void main(void) {
        mediump float fade = clamp(#{x} - dot(vDist,vDist), 0.0, 1.0) * uTexOpacity;
        gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)) * fade;
      }
    |]
  where
   x = toJSString $ show fadeConst