             segmentStartPos_eye, endPosCut_eye, fragmentColor, depth);
         finalColor = finalColor + fragmentColor * (1.0f - finalColor.a);
         if (depth != DEPTH_NOT_SET)
-          setPositionNdc(layerIndex, vec4(0, 0, depth, 1));
+          setPositionNdc(layerIndex, vec4(depth, depth, depth, 1));
       }
       else
       {

          segmentStartPos_eye, endPos_eye, fragmentColor, depth);
      finalColor = finalColor + fragmentColor * (1.0f - finalColor.a);

      setPositionNdc(layerIndex, vec4(0, 0, depth, 1));
    }
    else
    {

    }
  }

  setColorForLayer(layerIndex, finalColor);
  if (getDepth(layerIndex) == 0)
    setPositionNdc(layerIndex, vec4(1));

  for (++layerIndex; layerIndex < layerCount; ++layerIndex)
  {
    setColorForLayer(layerIndex, vec4(0));
    setPositionNdc(layerIndex, vec4(1));
  }
}

