 
     pos += step;
   }
-  d_output[y * width + x] = rgbaFloatToInt(dst);
-}
-
-typedef void(*renderKernel)(uchar4*, const uint, const uint, const float, const float3, const float3,
+  d_output[y * texwidth + x] = rgbaFloatToInt(dst);
+}
+
+typedef void(*renderKernel)(uchar4*, const uint, const uint, const uint, const uint, const float, const float3, const float3,
                              const float3, const float3, const float, const float3, const float);
 
 template<


  iwWarp.identity();
  iwWarp.translate(-1.0f, -1.0f, 0.0f);
  iwWarp.scale(1.0f / (static_cast<float>(w) * 0.5f), 1.0f / (static_cast<float>(h) * 0.5f), 0.0f);
}

#endif

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