 }
 
 vec4 calculateColorOfVolumes(in int activeObjects, in int activeObjectCount,
-    in vec4 segmentStartPos_eye, in vec4 endPos_eye, in vec4 fragmentColor, inout float depth)
+    in vec4 segmentStartPos_eye, in vec4 endPos_eye, in vec4 fragmentColor)
 {
   float segmentTextureLength  = calculateSegmentTextureLength(activeObjectCount,
       activeObjects, segmentStartPos_eye, endPos_eye);


    if (activeObjectCount > 0)
    {
      float depth = DEPTH_NOT_SET;
      fragmentColor = calculateColorOfVolumes(activeObjects, activeObjectCount,
          segmentStartPos_eye, endPos_eye, fragmentColor, depth);
      finalColor = finalColor + fragmentColor * (1.0f - finalColor.a);

      if (depth != DEPTH_NOT_SET)
        setDepth(depth);
    }
    else
    {

      vec4 endPosCut_eye = segmentStartPos_eye + alpha * vec4(dir, 0);
      if (activeObjectCount > 0)
      {
        fragmentColor = calculateColorOfVolumes(activeObjects, activeObjectCount,
            segmentStartPos_eye, endPosCut_eye, fragmentColor);
        finalColor = finalColor + fragmentColor * (1.0f - finalColor.a);
      }

      setColorForLayer(layerIndex, finalColor);
