 void calculateRayScatteringFromGround(in vec3 positionWC, in vec3 ray, in float atmosphereScale, in float innerRadius, out vec3 start, out float startOffset)
 {
     // Calculate the ray's starting position, then calculate its scattering offset
-    float cameraHeight = czm_eyeHeight + innerRadius;
-    start = normalize(positionWC) * cameraHeight;
+    float cameraHeight = length(positionWC);
+    start = positionWC;
     float height = length(start);
     float depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - cameraHeight));
     float startAngle = dot(ray, start) / height;

    return czm_raySegment(t1, t2);
}

void calculateMieColorAndRayleighColor(vec3 outerPositionWC, out vec3 mieColor, out vec3 rayleighColor)
{
    // Unpack attributes

    float innerRadius = u_radiiAndDynamicAtmosphereColor.y;

#ifdef GLOBE_TRANSLUCENT
    bool intersectsEllipsoid = false;
    vec3 startPositionWC = getTranslucentPosition(czm_viewerPositionWC, outerPositionWC, innerRadius, intersectsEllipsoid);
#else
    vec3 startPositionWC = getAdjustedPosition(czm_viewerPositionWC, innerRadius);
#endif

    vec3 lightDirection = getLightDirection(startPositionWC);
