             atmosphereColor = computeGroundAtmosphereFromSpace(positionWC, dynamicLighting, atmosphereLightDirection);
         #endif
 
-        vec4 groundAtmosphereColor = computeGroundAtmosphereColor(positionWC, atmosphereColor, finalColor, atmosphereLightDirection, cameraDist);
-
+        // Compute the true ground atmosphere color at the world position.
+        vec4 groundAtmosphereColor = computeFinalColor(positionWC, atmosphereLightDirection, atmosphereColor.rayleigh, atmosphereColor.mie, atmosphereColor.opacity);
+
+        // If there is fog, apply it.
         #ifdef FOG
-        float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
-        finalColor = vec4(czm_fog(v_distance, finalColor.rgb, groundAtmosphereColor.rgb * darken * groundAtmosphereColor.a), finalColor.a);
+            vec3 fogColor = groundAtmosphereColor.rgb;
+            
+            // If there is lighting, apply that to the 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.rgb, modifier), finalColor.a);
+            #else
+                finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb), finalColor.a);
+            #endif
         #endif
 
-        finalColor = finalColor * (1.0 - groundAtmosphereColor.a) + groundAtmosphereColor;
+        vec3 finalAtmosphereColor = finalColor.rgb * (1.0 - groundAtmosphereColor.a) + groundAtmosphereColor.rgb;
+        finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor, fade);
     }
 #endif
 

varying float v_distance;
#endif

#if defined(GROUND_ATMOSPHERE)
varying vec3 v_atmosphereRayleighColor;
varying vec3 v_atmosphereMieColor;
varying float v_atmosphereOpacity;

            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))
