             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
     {

        vec4 textureStartPos = volumes[0].textureMatrix * inverseViewMatrix *
                               currentFragment.eyePos;
        vec4 textureEndPos = volumes[0].textureMatrix * inverseViewMatrix *
                             next_fragment.eyePos;

        segment_texture_length =
            max(distance(textureStartPos.xyz * textureAtlasSize,


  gl_FragDepth = 0.0;

  uint maxAge = u_Counts[Saddr(ij)];

  if (maxAge == 0)
  {
    discard;  // no fragment, early exit
  }

  int activeObjects = 0;
  int activeObjectCount = 0;
  FragmentData currentFragment;
  FragmentData nextFragment;
  bool currentFragmentReadStatus = false;
  bool nextFragmentReadStatus = false;

  vec3 startPos_eye;
  vec3 lastPos_eye;
  vec3 endPos_eye;
  vec3 segmentStartPos_eye;
  vec3 direction_eye;
  vec4 pos_proj;

  float density = 0.0f;
