[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 - Doom 3 engine release and game code

Doom 3 engine release and game code

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

Re: Doom 3 engine release and game code

Postby revelator » Sun Nov 18, 2012 12:41 pm

Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby Barnes » Tue Nov 20, 2012 6:42 am

User avatar
Barnes
 
Posts: 232
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: Doom 3 engine release and game code

Postby revelator » Tue Nov 20, 2012 1:01 pm

thanks barnes but there not the same in doom3 :) thats why i been very carefull not to name them yet.

for one the color attrib in doom3 is 3 not 2 as for the texcoord ones the only one doom3 ever uses is attrib 8 which it also uses for some hokery pokery on normals for the skybox effects.

its very confusingingly setup :lol:

just to try it out so as to not speak out of my ass i tried with yours and the result was pretty funny to look at :) atleast untill the whole thing crashed hehe.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby mh » Tue Nov 20, 2012 6:08 pm

The thing about vertex attrib arrays is that you don't have to map them to the old-style arrays. Just pick a number (up to, normally, 15) and set up the array; so long as you use the matching attrib number to read from in your shader, it works.

GL_ARB_vertex_program defines the mapping for backwards-compatibility purposes; GLSL doesn't. So in theory you can mix and match old-style arrays and attrib arrays in your code if using GL_ARB_vertex_program, but in practice it's supposed to be disallowed by the spec (the fact that vanilla Doom 3 uses it despite that is quite evil). If using GLSL you should normally just use attrib arrays with either glBindAttribLocation or "layout(location=" syntax, depending on the GLSL version you're targetting.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby Spike » Tue Nov 20, 2012 7:01 pm

glsl allows for attribute 0 to alias vertex coords (my ati 9600 pro drivers do this - disabling the attribute also disables GL_VERTEX_ARRAY, not seen that on more recent hardware though).
Other attributes are not meant to alias anything, but if you don't adhere to hardware expectations then you'll have a performance reduction due to the driver having to recompile or remap things weirdly or something, even if you're adhering to the spec.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Doom 3 engine release and game code

Postby revelator » Wed Nov 21, 2012 12:07 am

Hmm interresting that might explain why my engine is slower than the stock doom3 :?
i also spotted a bug in my driver it seems as the shadow.vp is throwing an error about the position not being -1 weirdly enough it works most of the time but i noticed sometimes shadows get turned off.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby mh » Wed Nov 21, 2012 12:27 am

My own gut feeling is that should really only be relevant to older hardware. By the time you get to SM3-class stuff, which specifies generic attributes from the outset, it should be a total non-issue.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Wed Nov 21, 2012 1:23 am

heh my gfx card is an nvidia 560 gtx but i guess you didnt mean my exact hardware ;)
i hope i can solve this, the jump to C++ was bad enough but shaders eurgh :lol:

Btw GLEw is now compiled as part of the engine so no need to setup paths for libraries :) though the wgl extensions are still a problem its no worse than having to initialize them and you can safely remove all the
typedeffed crap in win_glimp.cpp.

Another huge performance monster we have identified at doom3world is the script lexer and bloodrayne is working on moving the more abrasive functions engine side
which should net us a rather huge performance increase.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Wed Nov 21, 2012 4:43 am

Looks like this now :)



im preparing an update package for Doom3 that can be used with pretty much any doom3 engine but will probably look best with mine
since im defaulting engine settings to max on ultra and pretty high on high setting :)

you get a new menu for Doom3 with widescreen support, updated textures/models, shaders with support for ambient light (makes it bright enough that you wont miss having the flashlight out with your weapon).
Shaders now default to OPTION ARB_precision_hint_nicest for higher precision. Theres no bloom shader or anything special only reworked versions of the original shaders. If you want bllom theres several mods out there for that :).

Textures are oversized so i decided to not yank them in a pk4 since the size would break Doom3 from loading it on 32 bit OS (yes there is a limit its around 2 gb i found out by testing).
I also made high res dds versions so people who can not run doom3 on ultra or high can still have nice textures.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby Barnes » Wed Nov 21, 2012 9:31 am

all shaders from doom3bfg (arb, glsl, hlsl)
User avatar
Barnes
 
Posts: 232
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: Doom 3 engine release and game code

Postby revelator » Wed Nov 21, 2012 12:01 pm

Heh nice :) i see id has seriously upped the functions to use shaders with the bfg edition.
Cant wait to have a look at it :)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby Barnes » Wed Nov 21, 2012 12:14 pm

Carmak use half angle for specular in glsl..... in 2004 he said he was going to get away from that :lol:
User avatar
Barnes
 
Posts: 232
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: Doom 3 engine release and game code

Postby revelator » Wed Nov 21, 2012 1:10 pm

guess he wanted something left in there for us to fiddle with :mrgreen:
looks like the new bugger has shadowmapping also wohoo :)
and he moved both the gui and fog to shaders.
weirdly enough it still incudes the cg shaders i wonder if the code for them is working in the bfg edition since in the GPL release the code was missing.
and the depth buffer is finally accessible via shaders to it seems that bodes well for ssao fans :mrgreen:

heh and ambient light is still disabled but reb fixed that years ago :)

# ambient lighting
# MOV light, localNormal.z; :(
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby mh » Wed Nov 21, 2012 6:00 pm

A simple quality improvement is to renormalize the half-angle in the fragment shader. That tightens things up quite a good deal and gets rid of a lot of the smudgy/blurry look of the original. Not sure if BFG does that (from the looks of things it doesn't) but if you're not, you should. ;)
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Wed Nov 21, 2012 6:23 pm

the shaders i can recognize the names of are 100% comparable to the old doom3 shaders so my guess is no ;) though they did move more of the renderer to the shaders :)

I think sikkpin does something like that as his interaction shader is a lot clearer than the original.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

PreviousNext

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest