is this tutorial any good?
http://www.quake-1.com/docs/quakesrc.org/95.html
i'm starting with this code from MH
http://forums.inside3d.com/viewtopic.php?p=25855#p25855
overbrights are enabled but RGBA is disabled. is this even possible? if so is there a tutorial i should start with?
i'd like to add colored lighting/lits to Enhanced GlQuake...
-
- Posts: 207
- Joined: Tue Sep 26, 2006 2:48 am
- Contact:
Re: i'd like to add colored lighting/lits to Enhanced GlQuak
'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.
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.
Re: i'd like to add colored lighting/lits to Enhanced GlQuak
You could also do the quake3 method and instead of brightening the screen, you could apply a blended quad to the screen with GL_SRC_DST_COLOR / GL_DST_ONE. Slightly fillrate intensive, and has some slight color precision loss in 16-bit color though, but both problems are irrelevant on modern post-Geforce2 hardware. I believe UnrealEngine2 does it this way.
and personally I would just start from LordHavoc's colored lighting tutorial from the darkplaces site. Overbrights can be lazily applied by shifting the lighting down and doing that quad thing I mentioned. My experience with this tutorial has been more software-rendering inclined however... and don't forget that some people have issues with LH's lightpoint code showing models as black as they stand on leaf edges.
and personally I would just start from LordHavoc's colored lighting tutorial from the darkplaces site. Overbrights can be lazily applied by shifting the lighting down and doing that quad thing I mentioned. My experience with this tutorial has been more software-rendering inclined however... and don't forget that some people have issues with LH's lightpoint code showing models as black as they stand on leaf edges.
i should not be here