                     }
                 }
             }
-            cloud.w *= dist_fade;
+            cloud.w *= clamp(dist_fade + 0.3, 0.0, 1.0);
         }
         cloud.xyz += scene_in_scatter;
     }


        if(0.0 <= hit_dist && hit_dist < far_dist)
        {
            const float cloud_absorption = 0.3;
            const float light_absorption = 0.3;
            const int march_count = 20;
            const vec3 cloud_speed = vec3(0.03, 0.03, 0.0) * TIME;
            const int light_march_count = 5;
            const bool inverse_ray_march = false;

            float march_step = cloud_thickness / float(march_count) / max(0.5, abs(eye_direction.y));
            float distortion = texture(texture_noise, ray_start_pos.xzy * 0.0005 + cloud_speed * 0.5).x;

            for(int i=0; i<march_count; ++i)
            {

                // fade top and bottom
                float fade = (length(ray_pos - earth_center_pos.xyz) - cloud_bottom_height) / cloud_thickness;
                fade = pow(clamp((1.0 - abs(fade * 2.0 - 1.0)) * 2.0, 0.0, 1.0), 0.3);
                float cloud_density = get_cloud_density(ray_pos.xzy, cloud_speed, fade);

                float light_intensity = 1.0;
                for(int j=1; j<light_march_count; ++j)
                {
                    vec3 light_pos = ray_pos + sun_direction.xzy * float(j) * march_step;
                    float d = length(light_pos.xyz - earth_center_pos.xyz) - cloud_bottom_height;
                    float light_density = get_cloud_density(light_pos.xzy, cloud_speed, 1.0);
                    light_intensity *= 1.0 - light_density * light_absorption;
                    if(cloud_thickness < d || d < 0.0 || light_intensity <= 0.01)
                    {
