             break;
 
           // prepare next segment
-          lastpos_eye = startpos_eye;
-          startpos_eye += stepFactor * dirvec_eye;
+          lastPos_eye = startPos_eye;
+          startPos_eye += stepFactor * direction_eye;
 
           // FIXME: do we need it?
-          // pos_proj = gl_ProjectionMatrix*vec4(startpos_eye,1.0f);
+          // pos_proj = gl_ProjectionMatrix*vec4(startPos_eye,1.0f);
           // pos_proj.z /= pos_proj.w;
           // pos_proj.z += 1.0f;
           // pos_proj.z /=2.0f;
         }  // sampling steps
 
         finalColor = finalColor + fragmentColor * (1.0f - finalColor.a);
-      }  // if (activeobjectcount > 0) ...
+      }  // if (activeObjectCount > 0) ...
     }
     else
     {


            vec3 textureSamplePos =
                (volumes[0].textureMatrix * inverseViewMatrix *
                 vec4(startpos_eye, 1.0f)).xyz;

            getVolumeSample(objectID, textureSamplePos, density, gradient);
            squareGradientLength = dot(gradient, gradient);

  }
}

vec3 calculateLighting(vec4 color, vec3 startPos_eye, vec3 gradient)
{
  const vec3 lightPos = vec3(0.0f, 0.0f, 0.0f);
  vec3 lightDir = normalize(lightPos - startPos_eye);
  vec3 viewDir = -1.0f * normalize(startPos_eye);
  vec3 normalizedGradient = normalize(gradient);

  // float dotNL = abs(dot(ngradient, lightDir));
