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.
raynorpat
Posts: 27
Joined: Tue Feb 26, 2008 12:21 am
Location: USA
Contact:

Re: Doom 3 engine release and game code

Post by raynorpat »

motorsep wrote:I have my reservations about GLSL backend. It's been 5 month and it seems all projects are in a coma.
Working on quake is a lot more fun though. :D
motorsep wrote:There is no clear indication to why GLSL has to be implemented. I bet rewriting ARB shaders to replace the original ones would be way less work.
I think mainly it's because of GPL concerns, but this is a valid point. Rewriting the original ARB shaders would be nice and quick, maybe a few hours worth of someones time.

Looking towards the future though, it's GLSL all the way. Like mh said, ARB shaders are limited and a lot of people, especially on the Doom3World forums, want more. Imagine trying to do some of these: [url]http://renderwonk.com/publications/s201 ... ourse/[url] with ARB shaders, you'd be burnt out in no time.
motorsep
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA
Contact:

Re: Doom 3 engine release and game code

Post by motorsep »

Aye, someone have already rewritten ARB shaders :) I just wish there was a way to get depth buffer without modifying the engine :(

Btw, are you planning in finishing your GLSL backport ? :)
raynorpat
Posts: 27
Joined: Tue Feb 26, 2008 12:21 am
Location: USA
Contact:

Re: Doom 3 engine release and game code

Post by raynorpat »

Don't think I probably will finish it anytime soon unfortunately since it was more of a quick challenge when I was unemployed for a while.

Working on quake2 is more gratifying for me right now :D
motorsep
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA
Contact:

Re: Doom 3 engine release and game code

Post by motorsep »

That's why I got these ARB shaders, cos I've had a feeling Doom 3 won't get GLSL any time soon ;)
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Post by mh »

ARB shaders aren't that difficult to write, but still not as nice/easy to work with as a real high-level language though. But still straightforward enough once you get over the initial "WTF is this?" reaction. The big stumbling block is GPL concerns though; the original shaders were part of the game content and the game content is still under it's original license, so you can't just rewrite the existing shaders and release them. What you could do is take the nv20 and/or r200 paths, which are shader-based but contained entirely in the GPL source, and translate those to a different shading language. You're still screwed on custom materials but at least you'd have the core interaction stuff.
motorsep wrote:mh, do you have a theory on why ARB to GLSL translator hasn't been implemented yet?
I had thought about doing one myself, but didn't bother in the end after I realised that I wasn't going to be working much on this code. The idea still interests me a little, but not sufficiently to actually break out the editor. I'm amazed that at least one of the GPU vendors doesn't provide something though.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
motorsep
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA
Contact:

Re: Doom 3 engine release and game code

Post by motorsep »

Eeh, yeah, I can learn from ARB shader that is proprietary and create my own. It's just a math and it will be the same for third-party shaders. There is no way the case could go to court and even if it does, it would be very hard to win it.

In other words, these shaders I have now are written from scratch, but are compatible with Doom 3 / RoE. So why wouldn't we be able to release them under whatever license we want to (or just use them for production) ?
Spirit
Posts: 1067
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Re: Doom 3 engine release and game code

Post by Spirit »

ARB -> GLSL can be done by http://icculus.org/mojoshader/ if I followed icculus' talk correctly.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
motorsep
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA
Contact:

Re: Doom 3 engine release and game code

Post by motorsep »

Spirit wrote:ARB -> GLSL can be done by http://icculus.org/mojoshader/ if I followed icculus' talk correctly.
Well, I wish I was a programmer ;)
motorsep
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA
Contact:

Re: Doom 3 engine release and game code

Post by motorsep »

Sent some pm's, please check :)
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Post by revelator »

poking a bit on the mojoshader (hmm fails with mingw compilers cannot find libraries ouch) :/.

Got your pm motorsep ill make a diff of my current work.
Productivity is a state of mind.
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Re: Doom 3 engine release and game code

Post by JasonX »

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

Re: Doom 3 engine release and game code

Post by motorsep »

yeah, that's what we use, but there is no GLSL backend. Also the author created a patch for aggregated GLSL backend work (raynorpat's and logical error's put together), but it's still the same half-way done GLSL back end.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Post by revelator »

<not related to the above but i discovered a big whoops by the ID folks

#define ID_STATIC_TEMPLATE static was used as a template for __forceinline well you cannot do that as __forceinline is allready static by nature. msvc lets it pass but both mingw and intel refuses to compile this xD.

In regards to motorseps issue im still working on it but someone more used to shader code might have better luck adding the missing parts (two or so functions missing).
Productivity is a state of mind.
motorsep
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA
Contact:

Re: Doom 3 engine release and game code

Post by motorsep »

Btw, has anyone started porting mfc stuff for the editors to qt or something similar ? Otherwise we will end up without tools because mfc only supported with commercial MSVC (not Express).
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Post by revelator »

Havent looked into it myself but i remember earlier in this thread that the darkmod folks had created a working standalone editor for doom3 :)
In case others need to convert MFC code to wxwidgets for crossplatform i do have a handy macro for visual studio that does a lot of the work.
Productivity is a state of mind.
Post Reply