- Home /
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.
Did I explain things well enough? The soft occlusion leaves shader casts the light rays, but I'm not sure what component in the shader allows this.
Answer by MarkD · Mar 25, 2014 at 05:07 PM
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.
Your answer
Follow this Question
Related Questions
light cast problem 1 Answer
Direction light shadows are not casting after baking lightmapping 1 Answer
Shadow To Ignore Specific Objects? 1 Answer
Volumetric light with cookies? 3 Answers