                        const float3 sphereCenter, const float sphereRadius,
                        const float3 planeNormal, const float planeDist,
                        void* d_depth, vvIbrImage::DepthPrecision dp,
-                       const float2 ibrPlanes, const bool gatherPass,
-                       const bool alphaPassIbr, float* d_gatheredAlpha)
+                       const float2 ibrPlanes, const bool alphaPassIbr,
+                       const bool gatherPass, float* d_gatheredAlpha)
 {
   const float opacityThreshold = 0.95f;
 

  {
    float3 depth = make_float3(0.0f, 0.0f, 0.0f);
    // convert position to window-coordinates
    const float4 depthWin = mulPost(c_MvPrMatrix, make_float4(maxDiffDepth.x, maxDiffDepth.y, maxDiffDepth.z, 1.0f));
    depth = perspectiveDivide(depthWin);

    depth.z++;


    if(t_useIbr)
    {
#if !ALPHA_PASS_IBR
      if(dst.w - lastAlpha > maxDiff)
      {
        maxDiff  = dst.w - lastAlpha;
        ibrDepth = pos;
      }
      lastAlpha = dst.w;
#else
      if (alphaPassIbr && !gatherPass && !ibrDepthFound)
      {
        if (dst.w > (d_gatheredAlpha[y * texwidth + x] * ibrOpacityWeight))
        {
          ibrDepth = pos;
          ibrDepthFound = true;
        }
      }
#endif
    }
  }

