     gl_FragColor =  finalColor;
 }
 
-#if defined(GROUND_ATMOSPHERE)
-vec4 computeGroundAtmosphereColor(vec3 positionWC, AtmosphereColor atmosphereColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist)
-{
-
-    vec4 groundAtmosphereColor = computeFinalColor(positionWC, atmosphereLightDirection, atmosphereColor.rayleigh, atmosphereColor.mie, atmosphereColor.opacity);
-
-
-
-    // TODO - Something with this
-    // float fadeInDist = u_nightFadeDistance.x;
-    // float fadeOutDist = u_nightFadeDistance.y;
-    // float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
-
-#ifdef HDR
-    // Some tweaking to make HDR look better
-    sunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);
-#endif
-
-#ifdef HDR
-    // Some tweaking to make HDR look better
-    groundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);
-#endif
-
-    return groundAtmosphereColor;
-}
-#endif
 
 #ifdef SHOW_REFLECTIVE_OCEAN
 

    finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
#endif

// #if defined(FOG) || defined(GROUND_ATMOSPHERE)
//     vec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);
// #ifndef HDR
//     fogColor = vec3(1.0) - exp(-fExposure * fogColor);
// #endif
// #endif

#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
    vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
    vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif

// #ifdef FOG
// #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
//     float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
//     fogColor *= darken;
// #endif

// #ifdef HDR
//     const float modifier = 0.15;
//     finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);
// #else
//     finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);
// #endif
// #endif

#ifdef GROUND_ATMOSPHERE
    if (!czm_backFacing())
    {
        AtmosphereColor atmosphereColor;

            atmosphereColor.rayleigh = v_atmosphereRayleighColor;
            atmosphereColor.mie = v_atmosphereMieColor;
            atmosphereColor.opacity = v_atmosphereOpacity;
            positionWC = v_positionMC;            
        #else
            bool dynamicLighting = false;
            #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
