   Clouds that cast shadows on the terrain
  I have a cool cloud shader (basic perlin noise but it scrolls/animates), and now im wondering how I can get the thing to cast shadows on the ground. Im thinking about maybe just scrolling a lightmap (greyscale image of the clouds) along the terrain, offsetting it according to the position of the sun. Sure it wouldnt be 100% accurate, but I THINK it would look good enough.The only problem I see with that, is how in the hell do I get this 'cloud image' from the shader? Like I said the clouds are perlin noise, so the only real images I have to work with are 4 greyscale noise maps (the final image is actually formed IN the shader, thus it doesnt really exist, or does it?).Or is there any better way to get your clouds to cast shadows? Speed is a huge concern, im shooting for low-mid range systems.Any advice appreciated!   
  Render the perlin noise to a texture. Then use that texture for your skybox and to shadow your terrain and objects.;  Ive thought about creating the image on the cpu, but that will be rather slow. The whole point of the shader was to do all that perlin noise work on the gpu. Is there anyway to 'output' a new texture FROM a pixel shader?If not I guess my only option is to make the image outside the shader (slow) and just do it once every second or so (to keep fps from tanking).   ;  I believe there are things called texture shaders. You might want to do a search on them (I myself have not worked with them yet so I can't really help you much there). Hope that help.   ;  Render the noise to texture (to save yourself from doing the expensive perlin-noise calculation twice), then calculate the UVs automatically based on the   position of the vertex X and Z.Allan   