     vec3 textureSamplePos =
       (volumes[currentObjectId].objectToDatasetMatrix *
        volumes[currentObjectId].textureMatrix * inverseViewMatrix *
-       startPos_eye).xyz;
+       currentPos_eye).xyz;
 
     float density = getVolumeSampleDensity(textureSamplePos);
     vec4 currentColor = transferFunctionLookUp(currentObjectId, density);

  }
}

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 = max(dot(normalizedGradient, lightDir), 0.0f);


    if (squareGradientLength > 0.05f)
    {
      currentColor.rgb = calculateLighting(currentColor, currentPos_eye.xyz, gradient);
    }
    currentColor.rgb = clampColor(currentColor.rgb);

