Lensflares are usually done by using textures (like the one below) which are oriented to the camera or may also be created via post effect.

Source: forums.unrealengine.com
For X:Rebirth we used textures at first but had some problems with compression artifacts especially when we had huge lensflares like the haze around the sun which dominates big parts of the screen.
I learned a really interesting trick from our Art-Director Alex which is to not use textures at all. Let’s recap: Normally you have a quad with a texture on it:

But if you invest a bit more geometry like here in this triangle-wheel, define the center-vertex as white, the outer ones black and then set its material to additive blending, you’ll end up with a very similar result:

In X:Rebirth we used this for all elements of our lensflares:

Source: X:Rebirth
Here’s an example video showing the different elements in a “real-world”-example.
HIGH-RES version: mp4/webm
Source: X:Rebirth
I’m not exactly sure if the extra geometry steals more performance than “real” textures would, but with this system we made sure that no compression artifacts appeared and if I look at the results I think this tech is quiet promising:

Source: X:Rebirth
What do you think about this approach? Do you like it? Do you know similar stuff? Let me know in the comments or via mail, twitter or facebook!

