[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/bbcode.php on line 112: 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 112: 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 112: 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 - Optimizing

Optimizing

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

Re: Optimizing

Postby Knightmare » Sun May 06, 2012 4:03 pm

Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: Optimizing

Postby mh » Sun May 06, 2012 6:24 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Optimizing

Postby Knightmare » Sun May 06, 2012 8:12 pm

D'oh, missed that! Got it working now. Thanks.

GL_LIGHTMAP_FORMAT is already set to GL_BRRA. I changed from GL_UNSIGNED_BYTE to GL_UNSIGNED_INT_8_8_8_8_REV, but there was not noticeable improvement.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: Optimizing

Postby mh » Sun May 06, 2012 10:56 pm

Yeah, it's much the same on NVIDIA. Where it really flies it with AMD and - especially - Intel. All the same, it does suggest that you still have something of a bottleneck somewhere else. :?:
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Optimizing

Postby Knightmare » Sat May 12, 2012 12:43 am

This is on a GTX 285, so I guess there shouldn't be any visible difference.

As an alternative to using texture arrays for lightmaps, would increasing the block size from 128x128 to 256x256 be a good idea? This would increase the batchability of surfaces by having fewer with different lightmap images, and thus need fewer rendering calls, but it might increase the bandwidth used for updating the lightmaps.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: Optimizing

Postby leileilol » Sat May 12, 2012 12:49 am

phew

good thing the engine i'm concerned with when I started this thread doesn't even update lightmaps


Is there any performance worries if I switch my muzzleflashes to a pair of autosprites, one being an autosprite2, instead of a standard polygon blob/half-circle flash?
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Optimizing

Postby r00k » Mon Jul 02, 2012 8:38 pm

Ugh, my head hurts.
I tried converting the lightmap updates to GL_BGRA and GL_UNSIGNED_INT_8_8_8_8_REV, still doing something wrong.
changed the order of the colors, added an alpha channel to the lightmap array, multiply by 4 instead of 3 etc
I still get garbled rainbow lights. The only evidence i was onthe right track was once i had muzzleflashes working... ugh!
Back to square one and attempt again.. :/
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Optimizing

Postby mh » Mon Jul 02, 2012 10:30 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Optimizing

Postby r00k » Tue Jul 03, 2012 2:27 am

K thanks,
i saw unsigned blocklights[MAX_LIGHTMAP_SIZE*3];
and this
byte lightmaps[4*MAX_LIGHTMAPS*LIGHTMAP_BLOCK_WIDTH*LIGHTMAP_BLOCK_HEIGHT];

i which confused me. block lights kinda tie into stride but it gets all fuzzy...
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Optimizing

Postby Spike » Tue Jul 03, 2012 7:56 am

its only the lightmaps array that needs to be *4.
and the only bit of code that needs to care what format the hardware is to be fed is the code that copies+downshifts from blocklights into lightmaps and the glTexSubImage call.
the rest should generally be *3 if you've got lit support, and *1 otherwise.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Optimizing

Postby r00k » Tue Jul 03, 2012 4:45 pm

Ack wait stop the presses!
In debug mode it finally works, select release rebuild the flashes are green and the lits are purple ugh! :P


LeiLei i would think there would be better performance in autosprites (2d) vs muzzleflash polygon orb. Though sometimes billboard/sprite muzzle flashes tend to lag a bit behind as the player moves
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Previous

Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest