 uniform float alphaThresholdForDepth = 0.1;
 
 uniform sampler3D volumeSampler;
+
+const float POSITION_NOT_SET = -2;
 
 #define transferFunctionRowCount 64.0f
 

    // sample accumulation
    fragmentColor = fragmentColor + sampleColor * (1.0f - fragmentColor.w);

    if (fragmentColor.w > alphaThresholdForDepth && position.w == -2)
    {
      setPositionAndDepth(vec4(startPos_eye, 1));
    }

    int activeObjectCount = bitCount(activeObjects);

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