anchor.diff:  
   #pragma tangram: global
   
  -float contour(in float d, in float w, float t) {
  -    return smoothstep(t - w, t + w, d);
  -}
  -
  -float sample(in vec2 uv, float w, float t) {
  -    return contour(texture2D(u_tex, uv).a, w, t);
  -}
  -
  -float sampleAlpha(in vec2 uv, float distance, float threshold) {
  -    const float smoothing = 0.0625 * emSize; // 0.0625 = 1.0/1em ratio
  -    float alpha = contour(distance, smoothing, threshold);
  -
  -#ifdef TANGRAM_SDF_MULTISAMPLING
  -    const float aaSmooth = smoothing / 2.0;
  -    float dscale = 0.354; // 1 / sqrt(2)
  -    vec2 duv = dscale * (dFdx(uv) + dFdy(uv));
  -    vec4 box = vec4(uv - duv, uv + duv);
  -
  -    float asum = sample(box.xy, aaSmooth, threshold)
  -               + sample(box.zw, aaSmooth, threshold)
  -               + sample(box.xw, aaSmooth, threshold)
  -               + sample(box.zy, aaSmooth, threshold);
  -
  -    alpha = mix(alpha, asum, 0.25);
  -#endif
  -
  -    return alpha;
  -}
  -
   void main(void) {
   
       vec4 color = v_color;
   
  -    float dist = texture2D(u_tex, v_texcoords).a;
  +    float signed_distance = texture2D(u_tex, v_texcoords).a;
   
       // - At the glyph outline alpha is 0.5
       //
  
positive.code: #pragma tangram: extensions
  
  #ifdef TANGRAM_SDF_MULTISAMPLING
      #ifdef GL_OES_standard_derivatives
          #extension GL_OES_standard_derivatives : enable
      #else
          #undef TANGRAM_SDF_MULTISAMPLING
      #endif
  #endif
  
  #ifdef GL_ES
      precision mediump float;
  
negative.code:     // - sdf_scale == fontScale / glyphScale:
      //   When the glyph is scaled down, 's' must be increased
      //   (used to interpolate 1px of the scaled glyph around v_sdf_threshold)
  
      float sdf_pixel = 0.5 / (u_max_stroke_width * v_sdf_scale);
      float add_smooth = 0.25;
      float filter_width = (sdf_pixel * (0.5 + add_smooth));
  
      float start = max(v_sdf_threshold - filter_width, 0.0);
      float end = v_sdf_threshold + filter_width;
  
      float alpha = smoothstep(start, end, signed_distance);
  
      color.a *= v_alpha * alpha;
  
      #pragma tangram: color
      #pragma tangram: filter
  