anchor.diff:  
       int nbLights = int(u_perPass.nbLights);
   
  -    vec3 albedo = pow(texture(albedoMap, vTexCoords).rgb, vec3(2.2));
  +    vec3 albedo = pow(BiCubic(albedoMap, vTexCoords).rgb, vec3(2.2));
  +    /*float roughness = BiCubic(roughnessMap, vTexCoords).r;
  +    float ao = BiCubic(aoMap, vTexCoords).r;
  +    float fresnel = BiCubic(fresnelMap, vTexCoords).r;
  +    vec3 n = perturb_normal( vNorm, excidentVector, vTexCoords );*/
  +
  +    //vec3 albedo = pow(BiCubic(albedoMap, vTexCoords).rgb, vec3(2.2));
       float roughness = texture(roughnessMap, vTexCoords).r;
       float ao = texture(aoMap, vTexCoords).r;
       float fresnel = texture(fresnelMap, vTexCoords).r;
  -    vec3 n = perturb_normal( vNorm, excidentVector, vTexCoords );
  +    vec3 n = perturb_normal( vNorm, excidentVector, vTexCoords);
   
       // Fresnel f0 term
       vec3 f0 = vec3(0.04); 
  
positive.code:     vec3 ambient = vec3(0.015) * albedo * ao;
      vec3 resultingColor = ambient + LO * shadowFactor;
  
      /*vec2 vFontSize = vec2(8.0, 15.0);
      resultingColor = mix( resultingColor, vec3(1.0, 1.0, 1.0), PrintValue( (gl_FragCoord.xy - vec2(0.0, 5.0)) / vFontSize, albedo.x, 4.0, 0.0));
      */
  
      // Gamma correction
      resultingColor = resultingColor / (resultingColor + vec3(1.0));
      resultingColor = pow(resultingColor, vec3(1.0/2.2));
      
      color = vec4(resultingColor,1.0);
  
  }
  
  // Light intensity attenuation
  
negative.code:     return floor(mod((fCharBin / pow(2.0, floor(fract(vStringCoords.x) * 4.0) + (floor(vStringCoords.y * 5.0) * 4.0))), 2.0));
  }
  
  
  //---------------------------------------------------------------
  // Bicubic texture filtering with Catmull-Rom interpolation by Santhosh G_
  //
  // https://www.codeproject.com/Articles/236394/Bi-Cubic-and-Bi-Linear-Interpolation-with-GLSL
  //---------------------------------------------------------------
  
  vec4 BiCubic( sampler2D textureSampler, vec2 TexCoord )
  {
      vec2 fsize = vec2(textureSize(textureSampler, 0));
      vec2 texelSize = 1.0 / fsize;
      vec4 nSum = vec4( 0.0, 0.0, 0.0, 0.0 );
      vec4 nDenom = vec4( 0.0, 0.0, 0.0, 0.0 );
      float a = fract( TexCoord.x * fsize.x ); // get the decimal part
      float b = fract( TexCoord.y * fsize.y ); // get the decimal part
      for( int m = -1; m <=2; m++ )
      {
          for( int n =-1; n<= 2; n++)
          {
              vec4 vecData = texture(textureSampler, 
                                 TexCoord + vec2(texelSize.x * float( m ), 
                      texelSize.y * float( n )));
              float f  = CatMullRom( float( m ) - a );
              vec4 vecCooef1 = vec4( f,f,f,f );
              float f1 = CatMullRom ( -( float( n ) - b ) );
              vec4 vecCoeef2 = vec4( f1, f1, f1, f1 );
              nSum = nSum + ( vecData * vecCoeef2 * vecCooef1  );
              nDenom = nDenom + (( vecCoeef2 * vecCooef1 ));
          }
      }
      return nSum / nDenom;
  }
  
  float CatMullRom( float f )
  {
      const float B = 0.0;
      const float C = 0.5;
      if( f < 0.0 )
      {
          f = -f;
      }
      if( f < 1.0 )
      {
          return ( ( 12. - 9. * B - 6. * C ) * ( f * f * f ) +
              ( -18. + 12. * B + 6. *C ) * ( f * f ) +
              ( 6. - 2. * B ) ) / 6.0;
      }
      else if( f >= 1.0 && f < 2.0 )
      {
          return ( ( -B - 6. * C ) * ( f * f * f )
              + ( 6. * B + 30. * C ) * ( f *f ) +
              ( - ( 12. * B ) - 48. * C  ) * f +
              8. * B + 24. * C)/ 6.0;
      }
      else
      {
          return 0.0;
      }
  }
  
  `;
  