     vec3 entryPos;
     float entryDepth;
     getEntry(entryPos, entryDepth);
-    // if we don't have an entry, discard the ray
+    // If we don't have an entry, discard the ray
     if (entryPos == vec3(0.0)) {
         discard;
     }

    raycastDepth = geoRatio * raycastDepth;

    float currentDepth = 0.0;
    // todo: shorten depth if geometry is intersecting!
    float nextStepSize = stepSize#{id}(position, direction);
    float currentStepSize;
    float previousJitterDistance = 0.0;

    int steps = 0;

    float aaOpacity = 1.0;
    int sampleIndex = 0;
    float opacityDecay = 1.0;


        position += direction * currentStepSize;

        sample#{id}(jitteredPosition, direction, accumulatedColor, accumulatedAlpha, nextStepSize);
        float sampleDistance = jitteredStepSize + previousJitterDistance;

        previousJitterDistance = currentStepSize - jitteredStepSize;

        float maxStepSize = raycastDepth - currentDepth;
        nextStepSize = min(nextStepSize, maxStepSize);
    }

    finalColor = vec4(accumulatedColor, (accumulatedAlpha.r + accumulatedAlpha.g + accumulatedAlpha.b) / 3);
