 uniform vec3 textureAtlasSize;
 uniform vec3 sampleDistance;
 uniform float alphaThresholdForDepth = 0.1;
+uniform float depthCutOff = 0.0;
 
 uniform sampler3D volumeSampler;
 

    endPos_eye = nextFragmentReadStatus ?
      nextFragment.eyePos : segmentStartPos_eye;

    if (activeObjectCount > 0)
    {
      fragmentColor = calculateColorOfVolumes(activeObjects, activeObjectCount,

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

  vec4 farPlane = vec4(0, 0, 1, depthCutOff);

  int activeObjects = 0;
  FragmentData currentFragment;
  FragmentData nextFragment;
