     updateActiveObjects(objectId, activeObjects);
     int activeObjectCount = bitCount(activeObjects);
 
-    /*
     if (objectId == 0 && fragmentColor.w > alphaThresholdForDepth)
     {
-      setPositionAndDepth(currentFragment.eyePos);
-    }
-    */
+      gl_FragDepth = fromEyeToNdcSpace(currentFragment.eyePos).z;
+    }
 
     // fetch next Fragment
     nextFragmentReadStatus = false;

            segmentStartPos_eye, endPosCut_eye, fragmentColor);
        finalColor = finalColor + fragmentColor * (1.0f - finalColor.a);
      }
      setPositionAndDepth(endPosCut_eye);
      outputColor = clamp(finalColor, vec4(0.0), vec4(1.0));
      finalColor = vec4(0);
      segmentStartPos_eye = endPosCut_eye;

    fragmentColor = fragmentColor + sampleColor * (1.0f - fragmentColor.a);

    if (fragmentColor.a > alphaThresholdForDepth)
    {
      gl_FragDepth = fromEyeToNdcSpace(startPos_eye).z;
    }

    // early ray termination
    if (fragmentColor.a > 0.999)
