How to distort effects with equirectangular projection I have a 360-degree panorama(rendered in Blender) and want to composite a glare effect onto it.  The problem is that once it is viewed in a 360 photo view the effect seems distorted due to projection distortion.  Is there any way to compensate for this?

Example:

This is a 360° equirectangular panorama of a simple scene of a sphere with a glare effect


If you then map it onto a sphere, then render that sphere, it looks like this


Because the sphere is the same color as the background is it impossible to see, but if I map bright to red and dark to green to make it easier to see against the background and increase the contrast, I get something like this


You can see that the effect pinches the glare effect towards the poles.

That blend file can be downloaded here
Lens flare depends on the orientation of the lens you are looking through in relation to the light source so it cannot be rendered into a panoramic image that is then viewed as if the orientation of the camera would be changing.

It would have to be an effect generated while viewing the image. So the answer seems to be:

No. There is no way to compensate for this at the stage where you are making the panoramic image. 

It should be done at the stage where the image is viewed.