     for (int slice=firstSlice; slice!=lastSlice; slice += sliceStep)
     {
         // compute upper left image corner
-        const float w1 = 1.f/cur[3];
-        const int iPosX = int(cur[0]*w1+0.5f);
-        const int iPosY = int(cur[1]*w1+0.5f);
-        cur[0] += c_inc[0];
-        cur[1] += c_inc[1];
-        cur[3] += c_inc[3];
+        const int iPosX = int(c_start[slice].x+0.5f);
+        const int iPosY = int(c_start[slice].y+0.5f);
 
         if(line < iPosY)
             continue;

   findSlicePosition(firstSlice, &start, NULL);
   findSlicePosition(firstSlice+sliceStep, &inc, NULL);
   inc.sub(&start);
   float h_start[4], h_inc[4];
   for (int i=0; i<4; ++i)
   {
       h_start[i] = start.e[i];
       h_inc[i] = inc.e[i];
   }
   bool ok = true;
   vvCuda::checkError(&ok, cudaMemcpyToSymbol(c_start, h_start, sizeof(float)*4), "cudaMemcpy start");
   vvCuda::checkError(&ok, cudaMemcpyToSymbol(c_inc, h_inc, sizeof(float)*4), "cudaMemcpy inc");

   // prepare intermediate image
   if (warpMode==CUDATEXTURE)

    if (line >= to)
        return;

    // initialise intermediate image line
    __shared__ extern uchar4 imgLine[];
    for (int ix=threadIdx.x; ix<width; ix+=blockDim.x)
