Lens Flare Problem (passing through collider)

Hello there

Im having a problem with lens flare: when the collider (in my case, a planet) got too far from camera, the flare is not occluded anymore. Im adding a package where you can see the problem: the scene FlareProblem shows the lens flare not being occluded, and in the FlareProblemFixed the flare works ok when I change the planet position. The problem occurs also when I move the camera, so fixing a “good” position for the planet is not a solution.

Can anybody help me?
Thanks!
Coluna

268064–9642–$lensflareproblem_113.unitypackage (793 KB)

Did you find a solution to this problem? I have the exact same issue. I moved the flare right behind the planet as well to see if it was a combination of the distance between all 3 (camera, planet, and flare) but it made no difference and I tried several different culling options on the camera. It seems to happen when I move 10000 units away from the back side of the collider. I can expand the size of the collider and get it working again but travelling farther out breaks it once more. I suppose we could do a ray cast from the sun to the camera and see if it hits the planet and then turn off the flare but it would be more expensive.

I guess a raycast operation is already what is being performed to see if the flare should visible. They maybe raycast too short? :?
I have looked at the scene, and have no idea how to fix it, besides doing your own raycast, and check the result.
And then file a bug report, maybe…