       __device__ __forceinline__ bool
       checkFeasible (const int3& g) const
       {
-        return (g.x >= -SHIFT_X && g.y >= -SHIFT_Y && g.z >= -SHIFT_Z && g.x < VOLUME_X +SHIFT_X && g.y < VOLUME_Y + SHIFT_Y && g.z < VOLUME_Z + SHIFT_Z);
+        return (g.x >= -shift.x && g.y >= -shift.y && g.z >= -shift.z && g.x < VOLUME_X +shift.x && g.y < VOLUME_Y + shift.y && g.z < VOLUME_Z + shift.z);
       }
 
       __device__ __forceinline__ float

        if (g.z <= 0 || g.z >= VOLUME_Z - 1)
          return numeric_limits<float>::quiet_NaN ();

        float vx = (g.x + SHIFT_X + 0.5f) * cell_size.x;
        float vy = (g.y + SHIFT_Y + 0.5f) * cell_size.y;
        float vz = (g.z + SHIFT_Z + 0.5f) * cell_size.z;

        // off by one stuff here FIX FIX FIX
        g.x = (point.x < vx) ? (g.x - 1) : g.x;
        g.y = (point.y < vy) ? (g.y - 1) : g.y;
        g.z = (point.z < vz) ? (g.z - 1) : g.z;

        float a = (point.x - (g.x + SHIFT_X + 0.5f) * cell_size.x) / cell_size.x;
        float b = (point.y - (g.y + SHIFT_Y + 0.5f) * cell_size.y) / cell_size.y;
        float c = (point.z - (g.z + SHIFT_Z + 0.5f) * cell_size.z) / cell_size.z;

        float res = readTsdf (g.x + 0, g.y + 0, g.z + 0) * (1 - a) * (1 - b) * (1 - c) +
                    readTsdf (g.x + 0, g.y + 0, g.z + 1) * (1 - a) * (1 - b) * c +


  rc.intr = intr;

  rc.shift = shift;

  rc.volume = volume;
  rc.vmap = vmap;
  rc.nmap = nmap;

  

  dim3 block (RayCaster::CTA_SIZE_X, RayCaster::CTA_SIZE_Y);
  dim3 grid (divUp (rc.cols, block.x), divUp (rc.rows, block.y));
