Doom 3 engine release and game code
Moderator: InsideQC Admins
Re: Doom 3 engine release and game code
Hmm i seem to have found atleast part of the performance problem, it seems to be related to entity triggers as the game lags somewhat whenever i trigger one.
Strange i didnt touch that code as far as i know :S but maybe its caused by something i done elsewhere ?
I also noticed that sometimes moving close to a wall the viewport gets all screwy and tries to drag the edge of the wall along with me as i move
Strange i didnt touch that code as far as i know :S but maybe its caused by something i done elsewhere ?
I also noticed that sometimes moving close to a wall the viewport gets all screwy and tries to drag the edge of the wall along with me as i move
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
Oh hell well the rendering problem is a driver bug in 306.97
still trying to figure out what makes entity triggers lag the game like theres no tomorrow.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
BFG Edition GPL code is out: https://github.com/id-Software/DOOM-3-BFG
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
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Re: Doom 3 engine release and game code
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
Short look we where wrong the changes are huge
no idlib anymore, the renderer looks nothing like the old one either and the vertexcache was totally rewritten.
Edit: idlib is there just overlooked it since the project looks a bit alien compared to the old GPL release.
Edit: idlib is there just overlooked it since the project looks a bit alien compared to the old GPL release.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
Fixed the missing muzzleflash lights. In R_AddSingleLight (tr_frontend_addlights.cpp) - this nasty block of code needs to die:
- Code: Select all
// We don't want the lights on weapons to illuminate anything else.
// There are two assumptions here -- that allowLightInViewID is only
// used for weapon lights, and that all weapons will have weaponDepthHack.
// A more general solution would be to have an allowLightOnEntityID field.
// HACK: the armor-mounted flashlight is a private spot light, which is probably
// wrong -- you would expect to see them in multiplayer.
if ( light->parms.allowLightInViewID && light->parms.pointLight && !eParms.weaponDepthHack ) {
continue;
}
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
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Re: Doom 3 engine release and game code
Nice
one thing we might have to fix also is the missing bink interaction since it seems id used bink for ingame videos none of the terminals showing videos ingame work anymore.
Ill see if i can find an opensource alternative that can play bink videos.
Ill see if i can find an opensource alternative that can play bink videos.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
Hmm ffmpeg can open bink or bik files though im not sure which codec it uses.
Edit found it its libavcodec
now we just need an interface since id have removed most of that part as well.
They also removed libfreespace which im a bit curious about since that library is LGPL2 ? its not propriarity it seems.
Edit found it its libavcodec
They also removed libfreespace which im a bit curious about since that library is LGPL2 ? its not propriarity it seems.
Last edited by revelator on Tue Nov 27, 2012 1:33 am, edited 1 time in total.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
Interestingly, the shaders are included with this source release - base/renderprogs.
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
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Re: Doom 3 engine release and game code
Aye and the backend is a real beauty
damn nice coding there.
Edit: just noticed there backend can convert cg to glsl at runtime
Edit: just noticed there backend can convert cg to glsl at runtime
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
// Determine whether or not the shadow volume needs to be rendered with Z-pass or
// Z-fail. It is worthwhile to spend significant resources to reduce the number of
// cases where shadow volumes need to be rendered with Z-fail because Z-fail
// rendering can be significantly slower even on today's hardware. For instance,
// on NVIDIA hardware Z-fail rendering causes the Z-Cull to be used in reverse:
// Z-near becomes Z-far (trivial accept becomes trivial reject). Using the Z-Cull
// in reverse is far less efficient because the Z-Cull only stores Z-near per 16x16
// pixels while the Z-far is stored per 4x2 pixels. (The Z-near coallesce buffer
// which has 4x4 granularity is only used when updating the depth which is not the
// case for shadow volumes.) Note that it is also important to NOT use a Z-Cull
// reconstruct because that would clear the Z-near of the Z-Cull which results in
// no trivial rejection for Z-fail stencil shadow rendering.
const bool renderZPass = ( drawSurf->renderZFail == 0 ) || r_forceZPassStencilShadows.GetBool();
heh seems id took the bat to it in this as well
// Z-fail. It is worthwhile to spend significant resources to reduce the number of
// cases where shadow volumes need to be rendered with Z-fail because Z-fail
// rendering can be significantly slower even on today's hardware. For instance,
// on NVIDIA hardware Z-fail rendering causes the Z-Cull to be used in reverse:
// Z-near becomes Z-far (trivial accept becomes trivial reject). Using the Z-Cull
// in reverse is far less efficient because the Z-Cull only stores Z-near per 16x16
// pixels while the Z-far is stored per 4x2 pixels. (The Z-near coallesce buffer
// which has 4x4 granularity is only used when updating the depth which is not the
// case for shadow volumes.) Note that it is also important to NOT use a Z-Cull
// reconstruct because that would clear the Z-near of the Z-Cull which results in
// no trivial rejection for Z-fail stencil shadow rendering.
const bool renderZPass = ( drawSurf->renderZFail == 0 ) || r_forceZPassStencilShadows.GetBool();
- Code: Select all
if ( renderZPass ) {
// Z-pass
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR );
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_KEEP, GL_DECR );
} else if ( r_useStencilShadowPreload.GetBool() ) {
// preload + Z-pass
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_DECR, GL_DECR );
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_INCR, GL_INCR );
} else {
// Z-fail removed
}
heh seems id took the bat to it in this as well
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
How exciting! Will have to check this out when I get home.
-

hogsy - Posts: 198
- Joined: Wed Aug 03, 2011 3:44 pm
- Location: UK
Re: Doom 3 engine release and game code
Small whoops on there part it seems one of the changes they had to make to make the source GPL broke the old Doom games that come with it, selecting them from the menu now crashes the engine :S
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: Doom 3 engine release and game code
- Code: Select all
if ( renderZPass ) {
// Z-pass
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR );
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_KEEP, GL_DECR );
} else if ( r_useStencilShadowPreload.GetBool() ) {
// preload + Z-pass
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_DECR, GL_DECR );
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_INCR, GL_INCR );
} else {
// Z-fail removed and restored :D
qglStencilOpSeparate(GL_FRONT, GL_KEEP, GL_DECR, GL_KEEP);
qglStencilOpSeparate(GL_BACK, GL_KEEP, GL_INCR, GL_KEEP);
}
-

Barnes - Posts: 226
- Joined: Thu Dec 24, 2009 2:26 pm
- Location: Russia, Moscow
Re: Doom 3 engine release and game code
reckless wrote:Edit found it its libavcodec
There is a lot of drama around this, make sure you are looking at the correct sources: http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
- Spirit
- Posts: 1031
- Joined: Sat Nov 20, 2004 9:00 pm
Who is online
Users browsing this forum: No registered users and 1 guest