[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - i'd like to add colored lighting/lits to Enhanced GlQuake...

i'd like to add colored lighting/lits to Enhanced GlQuake...

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

i'd like to add colored lighting/lits to Enhanced GlQuake...

Postby hondobondo » Wed Mar 26, 2014 5:49 pm

is this tutorial any good?


i'm starting with this code from MH


overbrights are enabled but RGBA is disabled. is this even possible? if so is there a tutorial i should start with?

hondobondo
 
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am

Re: i'd like to add colored lighting/lits to Enhanced GlQuak

Postby 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.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: i'd like to add colored lighting/lits to Enhanced GlQuak

Postby leileilol » Wed Mar 26, 2014 8:54 pm

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 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.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests