Guys, I have a problem.
First I didn't know how to make the shadow on the clouds. But then I found the way to do it.I take two points near the current point in the fragment shader. So the nearer the point is situated to the Sun, the lighter it is.
This code responds for the shadow:
Sky with clouds:
As the result we get nice clouds:
It's possible to make several layers of clouds.
I made the animated night with the help of a texture.
The ability of the stars to be seen depends on how high the Sun is.:
This code responds for the transparency of the texture:
And now I want to tell about the problem that I've been trying to understand and to solve for already three nights. Why when I mix the colour of the night and the colour with the clouds I get the sky coloured black? Please help me.I can't understand where I could make a mistake. The whole code is in my latest commit.
First I didn't know how to make the shadow on the clouds. But then I found the way to do it.I take two points near the current point in the fragment shader. So the nearer the point is situated to the Sun, the lighter it is.

This code responds for the shadow:
Code:
for (float i=0.0; i<6.0; i+=1.0){
posParticleCloud = 0.2*(cloudVec + sunDirection)*i;
n2 = clouds ( posParticleCloud, time*10.5, vec2 ( 0.03, 0.01 ) );
shadowCloud += 0.07*mix ( skyColor, vec4(1.0,1.0,1.0, 1.0), density ( n2.y, 3.5 ) );
}
Code:
vResColor = mix ( skyColor, vec4(clamp(ResColor.xyz*(ResColor.xyz - shadowCloud.xyz), 0.0, 1.0), 1.0), density ( n1.y, 3.5 ) );

It's possible to make several layers of clouds.
I made the animated night with the help of a texture.

The ability of the stars to be seen depends on how high the Sun is.:

This code responds for the transparency of the texture:
Code:
skyColor += alpha*textureCube ( texCube, skyVec );