   if (nextFragmentReadStatus)
   {
     finalColor = blend(finalColor, nextFragment.color);
-    if (position.w == -2 && nextFragment.color.w > alphaThresholdForDepth)
+    if (position.w == POSITION_NOT_SET && nextFragment.color.w > alphaThresholdForDepth)
     {
       setPositionAndDepth(nextFragment.eyePos);
     }
   }
 
-  if (position.w == -2)
+  if (position.w == POSITION_NOT_SET)
     position.w = 1;
 
   finalColor = clamp(finalColor, vec4(0.0), vec4(1.0));

uniform float alphaThresholdForDepth = 0.1;

uniform sampler3D volumeSampler;

#define transferFunctionRowCount 64.0f


    int activeObjectCount = bitCount(activeObjects);

    if (objectId == 0 && fragmentColor.w > alphaThresholdForDepth &&
        position.w == POSITION_NOT_SET)
    {
      setPositionAndDepth(currentFragment.eyePos);
    }
