[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 » Tue Jul 10, 2012 12:49 pm

Ok that explains a few things :)

Btw Sikkpin will join Inside3d and i given him the temporary registration details as registering is down ATM I hope one of the admins can register him for real.
And some cool news from him as it seems hees trying to cut a deal with justin for finishing raynors backend he would agree to make all of justins shaders :)
so we might see finshed glsl backend soon.
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 Jul 10, 2012 4:20 pm

That's good news.

I've personally been playing with the code again recently, and while I don't have intentions to embark on a serious project, I'm feeling keen enough on using the info in the ARB/NV10/NV20 and R200 backends to create a GPL-friendly GLSL interaction shader.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Tue Jul 10, 2012 6:09 pm

Cool :) looking forward to what you might come up with.
When Sikk joins here you could have a chat with him about shaders :) this guy is a wizard with ARB2 so you might end up with something very cool.
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 » Tue Jul 10, 2012 7:02 pm

Cleaned up my modded version with sikks 1.2 version integrated.

Most work in materials and textures.

Found out a lot of the textures where non power of two and while Doom3 can load these i found out it sometimes bugs view so i ran all textures through a tool i have for that and made them power of two.
The HD menu had a few fixes but needs a little tweaking in some areas (the sikkmod menu will overlap other opened menus it should close them, and you cannot overwrite savegames).

Engine optimized for multicore processors with SSE and i changed a few of the autoset options so i matches the highres replacment textures better (turning compression totally off in high and ultra setting).
Ill updated the torrent for the new version soon.
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 Jul 11, 2012 1:13 am

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

Re: Doom 3 engine release and game code

Postby mh » Wed Jul 11, 2012 8:02 am

Here's the current GLSL backend and shaders: http://pastebin.com/8FDsxdPF

Advance warning that the shaders are most likely still not 100% GPL-safe, but they're getting there. The next step will be to go over the backends we have that are GPL-safe (ARB/NV10/NV20/R200), determine what can be reproduced from them, and come up with something that is safe.

"Wot? No qgl?" Yes - life's too short to load extensions manually. I just used GLEW. So you can't just copy-n-paste this into a project and expect it to work; you need to do some extra stuff yourself. But it should be obvious. It replaces draw_arb2, by the way.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Wed Jul 11, 2012 11:24 am

:shock: twiches... ok gotta say thats extremely cool :D gonna try this out at once.
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 Jul 11, 2012 11:47 am

Done and works like a champ :D i gotta say im impressed. Looks even better than the old ARB2 backend. One question though if one where to write a shader for glsl specific stuff that ARB2 cannot handle
how would one be able to ? unless hardcoded in the engine. Or are there ways to get around that ?.

Now i just have to remove raynors backend though it doesnt seem to interfere with anything its not really needed anymore.
Btw i removed all the other backends as they where newer used on modern cards so after this only the ARB2 backend remains.
Seems i will have to toothcomb the source and remove the backend switches completely xD.
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 Jul 11, 2012 4:58 pm

It'll load "interaction_vs.glsl" and "interaction_fs.glsl" from glprogs in your gamedir if you have them - that's what I used for development (so you can be certain that it works), together with the "reloadARBprograms" command, otherwise turnaround times are just so slow that it's hardly worth bothering. The hard-coded in-engine versions are just there as fallbacks, and to get the basic shaders under the GPL.

Remember though that the shaders in that code are NOT GPL-friendly - they're relatively straight ports from the original ARB code.

What IS GPL-friendly in them is the matrix multiplications in the vertex shader (they can be reconstructed from TexGen calls elsewhere) and the specular power calculation in the fragment shader (which was a straight port from the in-engine R_SpecularTableImage function, hence the weird calculation instead of a proper power function).

Earlier on today I reconstructed the full fragment shader from the R200 backend; I haven't yet plugged it in and tested it, but when I do I'll post the code and that WILL be GPL-friendly too.

The only remaining item would be the half-angle calculation in the vertex shader. I haven't found any comparable formula in any of the classic literature or tutorials I've trawled through so far, so - assuming that things remain the same - the final GPL-friendly vertex shader may have a slightly different calculation.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby motorsep » Wed Jul 11, 2012 5:11 pm

motorsep
 
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA

Re: Doom 3 engine release and game code

Postby mh » Wed Jul 11, 2012 5:24 pm

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

Re: Doom 3 engine release and game code

Postby motorsep » Wed Jul 11, 2012 5:35 pm

@mh: So your GLSL backend is complete and GPL compatible? Where is the catch? :P
motorsep
 
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA

Re: Doom 3 engine release and game code

Postby mh » Wed Jul 11, 2012 5:59 pm

I don't have a GPL-compatible vertex shader yet, that's the catch.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby motorsep » Wed Jul 11, 2012 6:01 pm

Is it in works?
motorsep
 
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA

Re: Doom 3 engine release and game code

Postby mh » Wed Jul 11, 2012 6:30 pm

Yup.

The necessary calculations are all in idSIMD_Generic::CreateTextureSpaceLightVectors and idSIMD_Generic::CreateSpecularTextureCoords in fact, so the shader code can be derived from those.

I've found one interesting place where the normal mapping turns "inside-out" with this code, so consider anything I've posted so far as a work-in-progress snapshot rather than something you should grab and use straight away.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

PreviousNext

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest