 {
   Tsdf tsdf;
 
-  tsdf.volume = volume;
-  tsdf.volume_size = volume_size;
-
+  tsdf.volume = volume;  
+  tsdf.cell_size.x = volume_size.x / VOLUME_X;
+  tsdf.cell_size.y = volume_size.y / VOLUME_Y;
+  tsdf.cell_size.z = volume_size.z / VOLUME_Z;
+  
   tsdf.intr = intr;
 
   tsdf.Rcurr_inv = Rcurr_inv;

        float3 coo = make_float3 (x, y, z);
        coo += 0.5f;         //shift to cell center;

        coo.x *= volume_size.x / VOLUME_X;
        coo.y *= volume_size.y / VOLUME_Y;
        coo.z *= volume_size.z / VOLUME_Z;

        return coo;
      }

      };

      mutable PtrStep<short2> volume;
      float3 cell_size;

      Intr intr;

