Creating a cloud-like effect
To create a texture that resembles a sky with clouds, we can use the noise values as a blending factor between the sky color and the cloud color. As clouds usually have large scale structure, it makes sense to use low octave noise. However, the large scale structure often has higher frequency variations, so some contribution from higher octave noise may be desired. As our noise texture has summed octaves 1, 2, 3, and 4 in each channel, we'll use the second channel (the sum of octaves one and two).
The following images show the clouds generated by a seamless texture of two octave noise. (See Creating a seamless noise texture.)
The left-hand image tiles the noise values once in the horizontal direction. The right-hand image tiles the noise values in the vertical direction. The center image does not tile.
Getting ready
Set up your program to generate a seamless noise texture and make it available to the shaders through the uniform variable NoiseTex
.
There are two uniforms...