   }
   else
   {
+    // proceed outside-in
     if(gl_Vertex.x > splitX)
       x = imageWidth+floor(splitX)-gl_Vertex.x;
     if(gl_Vertex.y > splitY)

  float y = gl_Vertex.y;
  if(closer)
  {
    if(gl_Vertex.x < splitX)
      x = floor(splitX)-gl_Vertex.x;
    if(gl_Vertex.y < splitY)

  gl_FrontColor = texture2D(rgbaTex, tc);
  vec4 c = gl_FrontColor;
  float d = texture2D(depthTex, tc).r;
  // p will be in normalized device coordinates
  vec4 p = vec4(tc.x, tc.y, depthMin+d*depthRange, 1.);
  p.xyz *= 2.;
  p.xyz -= vec3(1., 1., 1.);
  gl_Position = reprojectionMatrix * p;
  if(d <= 0.)
  {
