Sun Shafts Effect and Clouds, Possible?

Hi,

I’m wondering if it is possible to have the sun shafts effect cast from overhead clouds. The current shader I have written doesn’t work, but if I use tree soft occlusion leaves shader it works, yet using that shader for clouds is ugly.

What I’m wondering is why the occlusion leaves shader works, but my shader (which is vertex lit based) doesn’t. Does it have to do with the alpha cut off within the shader? I know that there has to be a certain collision for the sun shafts to hit in order for the effect to happen. If someone could point me in the right direction or help me out that be great. I have looked all over the web and found nothing, that why I’m here. Thanks.

If I recall correctly the sunshaft script uses a depth map of the entire scene. Make sure your shader also writes to the depth channel so it will be included in its calculation.

If it is a small scene perhaps you should take a look at this generator.