   mapIntImg();
 
   vvGLTools::Viewport vp = vvGLTools::getViewport();
-  const int w = vvToolshed::getTextureSize(vp[2]);
-  const int h = vvToolshed::getTextureSize(vp[3]);
-
   dim3 blockSize(16, 16);
-  dim3 gridSize = dim3(iDivUp(w, blockSize.x), iDivUp(h, blockSize.y));
-
+  dim3 gridSize = dim3(iDivUp(vp[2], blockSize.x), iDivUp(vp[3], blockSize.y));
   const vvVector3 size(vd->getSize());
   const vvVector3 size2 = size * 0.5f;
 

         bool t_clipPlane,
         bool t_useSphereAsProbe
        >
__global__ void render(uchar4* d_output, const uint width, const uint height, const float dist,
                       const float3 volSizeHalf, const float3 L, const float3 H,
                       const float3 sphereCenter, const float sphereRadius,
                       const float3 planeNormal, const float planeDist)

    // In ordinary sphere mode, the intersection data is memorized.
    if (!intersectSphere(ray, sphereCenter, sphereRadius, &tsnear, &tsfar) && t_useSphereAsProbe)
    {
      d_output[y * texwidth + x] = make_uchar4(0);
      return;
    }
  }
