 layout(location = 1) out vec4 position;
 layout(location = 2) out vec4 outputColor2;
 layout(location = 3) out vec4 position2;
+layout(location = 4) out vec4 outputColor3;
+layout(location = 5) out vec4 position3;
+layout(location = 6) out vec4 outputColor4;
+layout(location = 7) out vec4 position4;
 layout(depth_any) out float gl_FragDepth;
 
 uniform vec3 backgroundColor = vec3(1.0, 1.0, 1.0);

  if (maxAge == 0)
    discard;  // no fragment, early exit

  vec4 farPlane = vec4(viewMatrix[0][2], viewMatrix[1][2], viewMatrix[2][2], depthCutOff);

  int activeObjects = 0;
  FragmentData currentFragment;

  }

  vec4 world = inverseViewMatrix * endPos_eye;
  float endDistance = dot(world, layerPlane1);
  if (endDistance < 0)
  {
    setPositionAndDepth(viewMatrix * vec4(world.xyz - endDistance * layerPlane1.xyz, 1.0f));
    outputColor = vec4(0);
  }
  endDistance = dot(world, layerPlane2);
  if (endDistance < 0)
  {
    setPositionAndDepth(viewMatrix * vec4(world.xyz - endDistance * layerPlane2.xyz, 1.0f));
    outputColor2 = vec4(0);
  }
  endDistance = dot(world, layerPlane3);
  if (endDistance < 0)
  {
    setPositionAndDepth(viewMatrix * vec4(world.xyz - endDistance * layerPlane3.xyz, 1.0f));
    outputColor3 = vec4(0);
  }

  for (--age; age < maxAge; age++)  // all fragments
