         }
     }
 
-    
-
-
     if (tDepth != -1.0) {
-        tDepth = calculateDepthValue(camera, tDepth/tEnd, texture(entryDepth, texCoords).x,
+        tDepth = calculateDepthValue(camera, tDepth / tEnd, texture(entryDepth, texCoords).x,
                                      texture(exitDepth, texCoords).x);
     } else {
         tDepth = 1.0;
     }
 
-    
 #ifdef HAS_BACKGROUND
     {
-        float d = texture(bgDepth,texCoords).x;
-        if(tDepth == 1 || d < tDepth){
+        float d = texture(bgDepth, texCoords).x;
+        if (tDepth == 1 || d < tDepth) {
             result = vec4(0);
-            result = drawBackground(texture(bgColor,texCoords),0,0,result,0,tDepth);
+            result = drawBackground(texture(bgColor, texCoords), 0, 0, result, 0, tDepth);
             tDepth = d;
         }
     }

    PickingData = texture(bgPicking, texCoords);
#else
    PickingData = vec4(0);
    if (entryPoint == exitPoint){
        discard;
    }
#endif
    if (entryPoint != exitPoint){
        color = rayTraversal(entryPoint, exitPoint, texCoords);   
    }

    FragData0 = color;

    vec4 result = vec4(0.0);
    vec3 rayDirection = exitPoint - entryPoint;
    float tEnd = length(rayDirection);
    float tIncr =
        min(tEnd,
            tEnd / (raycasting.samplingRate * length(rayDirection * volumeParameters.dimensions)));
    float samples = ceil(tEnd / tIncr);
    tIncr = tEnd / samples;
    float t = 0.5f * tIncr;
