       lastAlpha = dst.w;
     }
   }
-  if(t_isaDepth)
+
+  if(t_useIbr)
   {
     // convert position to window-coordinates
     const float4 depthWin = mulPost(c_MvPrMatrix, make_float4(maxDiffDepth.x, maxDiffDepth.y, maxDiffDepth.z, 1.0f));

  float maxDiff = 0.;
  float3 maxDiffDepth = make_float3(0.0f, 0.0f, 0.0f);
  float lastAlpha = 0.;
  while(true)
  {
    // Test for clipping.
    const bool clippedPlane = (t_clipPlane && (((t <= tpnear) && (nddot >= 0.0f))

      ((unsigned short*)(d_depth))[y * texwidth + x] = (unsigned short)(depth.z*float(USHRT_MAX));
      break;
    case vvImage2_5d::VV_UINT:
      ((unsigned int*)(d_depth))[y * texwidth + x] = (unsigned int)(depth.z*float(UINT_MAX));
      break;
    }
