shader_type sky;
render_mode use_debanding;

uniform float rayleigh : hint_range(0, 64) = 2.0;
uniform vec4 rayleigh_color : source_color = vec4(0.3, 0.405, 0.6, 1.0);
uniform float mie : hint_range(0, 1) = 0.005;
uniform float mie_eccentricity : hint_range(-1, 1) = 0.8;
uniform vec4 mie_color : source_color = vec4(0.69, 0.729, 0.812, 1.0);

uniform float turbidity : hint_range(0, 1000) = 10.0;
uniform float sun_disk_scale : hint_range(0, 360) = 1.0;
uniform vec4 ground_color : source_color = vec4(0.1, 0.07, 0.034, 1.0);
uniform float exposure : hint_range(0, 128) = 1.0;

uniform sampler2D night_sky : filter_linear, source_color, hint_default_black;
uniform sampler3D worlnoise : filter_linear_mipmap, repeat_enable;
uniform sampler3D perlworlnoise : filter_linear_mipmap, repeat_enable;
uniform sampler2D weather : filter_linear_mipmap, repeat_enable;

const vec3 UP = vec3( 0.0, 1.0, 0.0 );

// Optical length at zenith for molecules.
const float rayleigh_zenith_size = 8.4e3;
const float mie_zenith_size = 1.25e3;

float henyey_greenstein(float cos_theta, float g) {
        const float k = 0.0795774715459;
        return k * (1.0 - g * g) / (pow(1.0 + g * g - 2.0 * g * cos_theta, 1.5));
}

float get_cloud_density(vec3 pos) {
        float density = 0.0;
                density += texture(perlworlnoise, vec3(pos.xz * 0.01, 0.0)).r;
                density += texture(weather, vec2(pos.xz * 0.05)).r;
                density += texture(worlnoise, vec3(pos.xz * 0.1, 0.0)).r;
        return density * 0.33;
}

void sky() {
        if (LIGHT0_ENABLED) {
                float zenith_angle = clamp( dot(UP, normalize(LIGHT0_DIRECTION)), -1.0, 1.0 );
                float sun_energy = max(0.0, 1.0 - exp(-((PI * 0.5) - acos(zenith_angle)))) * LIGHT0_ENERGY;
                float sun_fade = 1.0 - clamp(1.0 - exp(LIGHT0_DIRECTION.y), 0.0, 1.0);

                // Rayleigh coefficients.
                float rayleigh_coefficient = rayleigh - ( 1.0 * ( 1.0 - sun_fade ) );
                vec3 rayleigh_beta = rayleigh_coefficient * rayleigh_color.rgb * 0.0001;
                // mie coefficients from Preetham
                vec3 mie_beta = turbidity * mie * mie_color.rgb * 0.000434;

                // Optical length.
                float zenith = acos(max(0.0, dot(UP, EYEDIR)));
                float optical_mass = 1.0 / (cos(zenith) + 0.15 * pow(93.885 - degrees(zenith), -1.253));
                float rayleigh_scatter = rayleigh_zenith_size * optical_mass;
                float mie_scatter = mie_zenith_size * optical_mass;

                // Light extinction based on thickness of atmosphere.
                vec3 extinction = exp(-(rayleigh_beta * rayleigh_scatter + mie_beta * mie_scatter));

                // In scattering.
                float cos_theta = dot(EYEDIR, normalize(LIGHT0_DIRECTION));

                float rayleigh_phase = (3.0 / (16.0 * PI)) * (1.0 + pow(cos_theta * 0.5 + 0.5, 2.0));
                vec3 betaRTheta = rayleigh_beta * rayleigh_phase;

                float mie_phase = henyey_greenstein(cos_theta, mie_eccentricity);
                vec3 betaMTheta = mie_beta * mie_phase;

                vec3 Lin = pow(sun_energy * ((betaRTheta + betaMTheta) / (rayleigh_beta + mie_beta)) * (1.0 - extinction), vec3(1.5));
                // Hack from https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Sky.js
                Lin *= mix(vec3(1.0), pow(sun_energy * ((betaRTheta + betaMTheta) / (rayleigh_beta + mie_beta)) * extinction, vec3(0.5)), clamp(pow(1.0 - zenith_angle, 5.0), 0.0, 1.0));

                // Hack in the ground color.
                Lin  *= mix(ground_color.rgb, vec3(1.0), smoothstep(-0.1, 0.1, dot(UP, EYEDIR)));

                // Clouds
                vec3 cloud_pos = EYEDIR * 1000.0;
                float cloud_density = get_cloud_density(cloud_pos);
                vec3 cloud_color = vec3(1.0) * cloud_density;
                Lin += cloud_color * 0.1;

                // Solar disk and out-scattering.
                float sunAngularDiameterCos = cos(LIGHT0_SIZE * sun_disk_scale);
                float sunAngularDiameterCos2 = cos(LIGHT0_SIZE * sun_disk_scale*0.5);
                float sundisk = smoothstep(sunAngularDiameterCos, sunAngularDiameterCos2, cos_theta);
                vec3 L0 = (sun_energy * extinction) * sundisk * LIGHT0_COLOR;
                L0 += texture(night_sky, SKY_COORDS).xyz * extinction;

                vec3 color = Lin + L0;
                COLOR = pow(color, vec3(1.0 / (1.2 + (1.2 * sun_fade))));
                COLOR *= exposure;

                // Cloud shadows
                float cloud_shadow = get_cloud_density(cloud_pos + LIGHT0_DIRECTION * 100.0);
                COLOR *= 1.0 - cloud_shadow * 0.5;
        } else {
                // There is no sun, so display night_sky and nothing else.
                COLOR = texture(night_sky, SKY_COORDS).xyz;
                COLOR *= exposure;
        }
}
код работает но вместо неба и облаков какая то серая рябь. Исправь что бы было реалистичное небо с реалистичными облаками динамическими, которые отбрасывают тень от освещения