I have added a lens flare to a directional light in my scene.
It works rather well, although the time based fade out of the flare when it is occluded ruins a bit the quality of the effect.
I have a more important problem though. When any transparent face enters the view frustrum, for example a face with the very basic Transparent/Diffuse shader, the lens flare disappears.
How can I fix this?
From the documentation
You can put these colliders on a unique layer so that the lens flare can ignore them by using the “Ignore Layers” setting for the flare in the Inspector.
@aNTenna trEE: Thanks a lot for replying to my question. But have you really read it?
I am not talking about a collider. I am not talking about a transparent mesh occluding the lens flare.
I am talking about any part of a transparent mesh entering the view frustrum. (in fact, since the culling is done with a bounding box or bounding sphere, the said mesh may actually be off screen)
So say the lensflare is in the upper right corner of the screen, if a transparent face is at the lower left corner of the screen (not occluding the lensflare), the lensflare is instantaneously disabled.
This problem has nothing to do with colliders but rather with some kind of conflict between the lens flare and transparent faces.
Alright, sorry for the wrong answer, but it’s the most common problem people have with lens flares.
I’m not able to reproduce the issue you’re having. Can you post an example or give more information?
It seems that the problem occurs only if the SSAO image effect is on…