Or through our Perlin Noise
1. create four textures of 256,256,256,256
2. Create a temporary texture with the size of 32.
3. Add a random number to the temporary texture and compress it to the 0-255 range (relative to d3dfmt_a8r8g8b8 format)
4. Use the texture created in step 1 as the rendertarget, and render the texture in step 3 to a rectangle of the same size as rendertarget. Note that the texture coordinate is multiplied by 2 on the basis of the previous one. Linear filtering,
Surround mode.
5. Use a shader to synthesize the four images and add an animation to move the texture coordinates. The high frequency moves faster than the low frequency, and the high frequency amplitude is twice higher than the low frequency.
6. Use POW (sharpness, C) to make the cloud more fluffy. C is [0,255]
Smaller noise texture size
Large noise texture size
I was planning to write the cloud light rendering on game programming gems5, but I never figured out the algorithm. Let's take a look at it and solve it slowly.
I have another article. You can check it out. Introduction of a Website: http://www.vterrain.org/this site is good, outdoor scene rendering, including all aspects. There are many resource connections.
Reference:
Http://freespace.virgin.net/hugo.elias/models/m_clouds.htm
Download:
/Files/ttthink/cloudrendering.rar