by Spike » Wed Mar 26, 2014 6:44 pm
'and replace the entire function with this'
no.
overbrights and rgb lighting are separate concepts. rgb is simply more channels (gl_rgb or gl_rgba instead of gl_intensity), while overbrights are weird clamp-avoidance hacks (expressing the lightmap texture as 0-2 instead of 0-1).
quake3's overbrighting is fun. halve the lightmap intensity, and double the entire screen's brightness with hardware gamma. makes things really quite annoying as all the various shaders then need to halve lighting too, if they don't blend in some lightmap value...
essentually ((lightmap*0.5)*walltexture)->framebuffer)*2->screen.
most quake1 overbrighting techniques depend upon a multitexture extension and double the result of fixed function pipeline before the final blend-on-framebuffer step. ((lightmap*0.5)*walltexture)*2->framebuffer->screen.
I'm sure you can still have fun figuring out how to merge the two.
.