Im going to do lens flares but Im not sure how to handle culling the reference point. Although its a deferred renderer, more control over placement is wanted so doing it purely as a post effect on the bright parts probably isnt an option.
I need to have a set of flare quads (rects...) drawn at specific locations offset from the specified location in 3d, but I need the entire effect (the quad set) to pop on and off depending on the visibility of the flares 3d reference point.
In short, I need to draw or not draw the flare quad set based on whether a single 3d position is culled or not so it pops around occluder edges..... What would be a good way to do that?
I read one way, where the effect was drawn whether or not the results of a single pixel depth read back was visible or not (ugh, depth read)
Ive seen occlusion queries suggested, but seems like over kill.
I was thinking maybe shooting a ray from the 3d flare position to the near plane through the scene and seeing if any triangles are hit (but then theres the triangle picking overhead.....)
Point sprites, although I read they cull by the center (which is good in this case), it seems some hardware might not do this, and if it did, only the first flare quad would cull but the others that belong to it would escape around the occluder.
So Im not really sure what to do.