 
 uniform sampler3D volumeSampler;
 
+const float DEPTH_NOT_SET = -10.0f;
+
 #define transferFunctionRowCount 64.0f
 
 struct VolumeData

  setColorForLayer(layerIndex, finalColor);

  for (++layerIndex; layerIndex < layerCount; ++layerIndex)
    setColorForLayer(layerIndex, vec4(0));
}



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

