I have implemented Lens Flares, and committed the code changes required to CVS.
To create lens flares, you modify stars.tbl, for every sun to include, after $SunRGBI:
$Flare:
+FlareCount ;number of flares
$FlareTexture1: ;texture name
$FlareTextureN: ;goes up to 6 different textures
$FlareGlow1: ;up to 10 glows (actual bitmaps on the screen
+FlareTexture: ;texture number, between 0 to N-1 (references to textures defined earlier, just substract 1)
+FlarePos: ;floating point number, 0.0 is on the sun, 1.0 is the point on the opposite side (treat the center of the screen as the point of symmetry)
+FlareScale: ;scale
$FlareGlowN:
...
For example, the flare I use with every sun is:
$Flare:
+FlareCount: 10
$FlareTexture1: Corona1
$FlareTexture2: Corona2
$FlareTexture3: Corona3
$FlareTexture4: Corona4
$FlareGlow1:
+FlareTexture: 0
+FlarePos: 1.0
+FlareScale: 1
$FlareGlow2:
+FlareTexture: 1
+FlarePos: 0.717
+FlareScale: 1
$FlareGlow3:
+FlareTexture: 1
+FlarePos: 0.25
+FlareScale: 1
$FlareGlow4:
+FlareTexture: 0
+FlarePos: 0.611
+FlareScale: 1
$FlareGlow5:
+FlareTexture: 3
+FlarePos: 0.381
+FlareScale: 1
$FlareGlow6:
+FlareTexture: 2
+FlarePos: 1.026
+FlareScale: 1
$FlareGlow7:
+FlareTexture: 3
+FlarePos: 1.056
+FlareScale: 1
$FlareGlow8:
+FlareTexture: 3
+FlarePos: 0.083
+FlareScale: 11
$FlareGlow9:
+FlareTexture: 2
+FlarePos: 0.656
+FlareScale: 1
$FlareGlow10:
+FlareTexture: 2
+FlarePos: 0.549
+FlareScale: 1
I can't attach files, or I'd show you some screen-shots. Even though the glow I put together is totally half-assed with bad textures, it still looks nice.
If the sun is occluded, the glow won't show up, and as long as you don't screw the table entry up, everything should work. I'm pretty sure the limits can go up a lot without losing stability, so give me a shout if you want higher limits.