anchor.diff:  }
   
   vec4 blendColors2(const in vec3 sample_pos) {
  -  vec3 total_color = vec3(0.0f);
  +  vec3 total_color = vec3(0.0);
     vec3[5] colors = getColors(sample_pos);
  -  float total_weight = 0.0f;
  +  float total_weight = 0.0;
     float[5] weights = getWeights(sample_pos);
     for(uint i = 0u; i < num_kinects; ++i) {
       total_color += colors[i] * weights[i];
  
positive.code:   return distances;
  }
  float[5] getQualities(const in vec3 sample_pos) {
    float qualities[5] =float[5](0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
    for (uint i = 0u; i < num_kinects; ++i) {
      vec3 pos_calib = texture(cv_xyz_inv[i], sample_pos).xyz;
      float quality = 0.0f;
      quality = texture(kinect_qualities, vec3(pos_calib.xy, float(i))).r;
      qualities[i] = quality;
    }
  
negative.code: }
  
  vec4 blendColors(const in vec3 sample_pos) {
    vec3 total_color = vec3(0.0);
    vec3 total_color2 = vec3(0.0);
    float total_weight = 0.0;
    float total_weight2 = 0.0;
    vec3 colors[5] =vec3[5](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));
    float distances[5] =float[5](0.0, 0.0, 0.0, 0.0, 0.0);
    for(uint i = 0u; i < num_kinects; ++i) {
      vec3 pos_calib = texture(cv_xyz_inv[i], sample_pos).xyz;
      vec2 pos_color = texture(cv_uv[i], pos_calib).xy;
      colors[i] = texture(kinect_colors, vec3(pos_color.xy, float(i))).rgb;
  
      float depth = texture(kinect_depths, vec3(pos_calib.xy, float(i))).r;
      float quality = 0.0;
      distances[i] = abs(depth - pos_calib.z);
      // blend if in valid depth range
      if(distances[i] < limit) {
        quality = texture(kinect_qualities, vec3(pos_calib.xy, float(i))).r;
      }
      // quality plus inverse distance
      total_color += colors[i] * quality / (distances[i] + 0.01);
      total_weight += quality / (distances[i] + 0.01);
      // fallback color blending
      total_color2 += colors[i] / distances[i];
      total_weight2 += 1.0 / distances[i];
    }
    if(total_weight > 0.0) {
      total_color /= total_weight;
      return vec4(total_color, 1.0);
    } 
    else {
      total_color2 /= total_weight2;
      return vec4(total_color2, -1.0);
    }
  }
  
  vec3 blendNormals(const in vec3 sample_pos) {
    vec3 total_normal = vec3(0.0);
    vec3[5] normals = getNormals(sample_pos);
    float total_weight = 0.0;
    float[5] weights = getWeights(sample_pos);
    for(uint i = 0u; i < num_kinects; ++i) {
      total_normal += normals[i] * weights[i];
  