PDA

View Full Version : Doom 3 - Enhance the Experience (Part 2)


Pages : [1] 2

Slyder
08-22-04, 08:08 AM
I decided to post my findings here, mainly because this is for all you ATI owners. I am posting this for your information as it may be of some use to some of you.

Enhance the ATI Experience


It is, of course, a well known fact that Doom 3 is a game which performs best when using boards by nVidia. This has left ATI fans frustrated and eager for a driver update or some other fix. Since ATI has not yet responded, a way of improving the way Doom 3 handles on ATI cards has been posted on the Beyond3D forums. According to the author, the performance increase can increase frame rate from 34fps in 1280x1024 to 48fps. Changes would, of course, depend on each individual set-up. A further suggestion from the forum is that the fix really kicks-in if vsync is enabled. Please feel free to post your experience with the fix on the MegaGames Forums.

The fix involves changing some code which can be found in the Doom 3 pak000.pk4 file. For those not interested in the technical side of the fix, an already changed file is available by following the download tab above. Extract so that the shader file goes under doom3\base\glprogs. This replaces a dependent texture read with equivalent math, which runs better on ATI cards, but seems to run slower on NV boards, so only apply this if you got an ATI card.

...this should be good enough proof that ATI hardware can run Doom3 just as good if not better than nVidia, and that we can pass on all the "ATI suck in OpenGL", "ATI's drivers suck" etc. into the trashcan where it belongs.

The full, do-it-yourself, fix is as follows:

I picked up Doom3 today and let be begin by saying it's a kickass game so far. A few minuses like weapon reload (which I find add nothing to a game, except annoyance, so I don't know why many devs keep adding it to their games), but overall much above my expectations.

Anyway, to the fun part, exploring the technology.
I think I've found the source of why this game runs comparably slow on ATI hardware vs. nVidia at the moment, and found a solution to the problem.

First, open your doom3\base folder. Doubleclick on the pak000.pk4 file. In the "window can't open this file .. .bla bla" dialog, go on and associate the file with an app like WinRar. With this file open in WinRar, go to the glprogs directory in the file. In there you'll find the shaders. The interaction.vfp file seems to be the main rendering shader. Altering this shader to output a constant color turns most objects into that constant color, except for stuff like computer screens etc.

So doubleclick the interaction.vfp file to open it (you may have to associate the .vfp extension with a text editor like notepad or wordpad first since we're going to edit the file). Scroll down to the fragment shader. You'll find these rows:

Code:

PARAM subOne = { -1, -1, -1, -1 };
PARAM scaleTwo = { 2, 2, 2, 2 };


Add this right below them:

Code:

PARAM specExp = { 16, 0, 0, 0 };


Now scroll down to this:

Code:

# perform a dependent table read for the specular falloff
TEX R1, specular, texture[6], 2D;


Comment out that line by adding a "#" to it, and add another line that will do the same thing with math instead, so it should look like this:

Code:

# perform a dependent table read for the specular falloff
# TEX R1, specular, texture[6], 2D;
POW R1, specular.x, specExp.x;


Save the file and close your text editor. WinRar will ask if you want to update the file in the archive, select yes. Close WinRar and enjoy about 40% higher performance in Doom3. Haven't done extensive testing yet, but my performance went from 34fps in 1280x1024 to 48fps.

Conclusion and discussion:
I don't want to complain about Carmack's work, I still consider him to be the industry leader in graphics engines. Though when I read the shader it striked me how many texture accesses it did compared to the relatively short shader, even for stuff that could just as well be done with math for a small cost in instructions. Using a dependent texture lookup for POW evaluation makes a lot of sense for R200 level hardware due to instruction set limits, but for R300 and up it's much better to just spend the three cycles it takes to evaluate POW with math instead of risking texture cache trashing with a dependent texture read, which may be much more costly, especially since the access pattern in this case will be far from linear. Also, using math improves the quality too, even though it may not be very noticable in this game.

I should point out though that I'm not sure if the constant specular factor 16 that I chose is the one that the game uses, so output may be slightly different, but if this solution will be worked into the game in a future patch, then this is easily configurable by the game so that there won't be a difference, except a lot faster.

An interesting follow-up discussion may be why this dependent texture lookup is much slower on our hardware than on nVidia. Maybe there's an architectural difference that's to blame, or maybe something else? The main point here though is that this should be good enough proof that ATI hardware can run Doom3 just as good if not better than nVidia, and that we can pass on all the "ATI suck in OpenGL", "ATI's drivers suck" etc. into the trashcan where it belongs.

source = megagames.com/news/html/pc/doom3enhancetheexperiencept2.shtml

Lfctony
08-22-04, 08:38 AM
http://www.nvnews.net/vbulletin/showthread.php?t=34253

Old news, improvements are nowhere near 40%, maybe 1-2fps, and it introduces visual anomalies.

Humus
08-22-04, 02:28 PM
Old news indeed, and I don't want another flamewar about it, but the gain is larger than just a few fps and visual anomalies are gone with the latest tweak where the math matches the specular lookup table, unlike in the first couple of versions where I assume it was a POW function.

Lfctony
08-22-04, 03:39 PM
Just wanted to point this out for those who haven't been following the B3D forum and haven't yet applied the "Humus tweak." It appears the primary gains realized by Humus' tweak are caused by sidestepping the performance hit incurred by ATI's driver control panel forced AF doing AF on the texture lookup table, rather than shader performance.

This is from other users, not personal experience.
http://www.nvnews.net/vbulletin/showthread.php?t=34492

Assi9
08-23-04, 10:21 AM
This is from other users, not personal experience.
http://www.nvnews.net/vbulletin/showthread.php?t=34492

Ya and look who you are quoting... only one of the biggest NV Biased/Nvidiot on the internet...

Lfctony
08-23-04, 12:43 PM
Tests of multiple users don't lie, take a look at other users' results. Ruined's results aren't the only ones.

superklye
08-23-04, 01:10 PM
Ya and look who you are quoting... only one of the biggest NV Biased/Nvidiot on the internet...

you know, calling people Nvidiots (especially here) really isn't doing anything to further your cause.

mezkal
08-23-04, 01:12 PM
I was gonna say EXACTLY the same thing. I think maybe the *Ass* in his name has some bearing....

majortom
08-23-04, 01:18 PM
im one of the people who got a huge performance increase with this. i've gone from 8x6 medium to 10x7 high with smoother gameplay. ingame, with fps on, i get 60+ in empty rooms, anywhere from 40-60 with a few enemies, and no lower than high 20's with multiple enemies (which doesnt happen that often anyway). btw, i just got to delta labs (lev 1). geez, i cant believe im still playing...

superklye
08-23-04, 01:28 PM
I was gonna say EXACTLY the same thing. I think maybe the *Ass* in his name has some bearing....

heh, not a bad assumption. ;)

Assi9
08-23-04, 04:48 PM
you know, calling people Nvidiots (especially here) really isn't doing anything to further your cause.

And what cause would that be???

Apparently, you know more about my motives and agendas than I do...

Anyways, I think the terms Nvidiots and fanATIcs have been used so much that one shouldn't take offense to either... but apparently... SOME people are more sensative than others...

Assi9
08-23-04, 04:50 PM
I was gonna say EXACTLY the same thing. I think maybe the *Ass* in his name has some bearing....

You bet it does.

superklye
08-23-04, 04:55 PM
And what cause would that be???

Apparently, you know more about my motives and agendas than I do...

Anyways, I think the terms Nvidiots and fanATIcs have been used so much that one shouldn't take offense to either... but apparently... SOME people are more sensative than others...

What exactly, pray tell, is offensive about fanATIc? How is that demeaning anyone?

What I meant by "furthering your cause" was making friends here. Great strategy you've been using so far. :rolleyes:

jimmyjames123
08-23-04, 06:11 PM
Old news indeed, and I don't want another flamewar about it, but the gain is larger than just a few fps

The gain is relatively small (0-5%?) when comparing the "Humus" tweak to application controlled AF. Apparently, the tweak only significantly speeds up the game for those who set AF via the control panel.

http://www.nvnews.net/vbulletin/showthread.php?t=34492

mezkal
08-23-04, 06:34 PM
You bet it does.

As does you're whole name Ass i (ee) 9.....Assinine.

Hmm. You said it buddy.

And for clarity:-

FanATIc - ATI + Fanatic == Enduring ATI supporter

NvIDIOT - NVIDIA + Idiot == A supporter of NVIDIA with lowered intelligence.

Now unless you're truely assinine, I'm sure you can see why some might take offence.

If you can can't. Eat me.

luidspreker
08-23-04, 06:53 PM
As does you're whole name Ass i (ee) 9.....Assinine.

Hmm. You said it buddy.

And for clarity:-

FanATIc - ATI + Fanatic == Enduring ATI supporter

NvIDIOT - NVIDIA + Idiot == A supporter of NVIDIA with lowered intelligence.

Now unless you're truely assinine, I'm sure you can see why some might take offence.

If you can can't. Eat me.

Though I agree with your literal definition I have to agree with Assi that both terms are common use. Whenever someone favors one brand over the other these titles are applied by both sides.

So I think it is fair to conclude both terms are of igual "offending value"

Lfctony
08-23-04, 07:28 PM
Fanatics are idiots as well, because they fail to see logic. So, whether someone is a fanATIc or an Nvdiot, it spells stupid to me. :) Both types suck.

sabrewulf165
08-23-04, 08:16 PM
this whole issue is so tired out... i wish hamburgler or whatever his name is that wrote this hack would stop stirring the pot every fifteen minutes with his "non-affiliated" wannabe miracle solutions. Just wait for a real driver release people, gawd.... i'm sure your X800's don't run the game THAT poorly

evilchris
08-23-04, 08:22 PM
Ya and look who you are quoting... only one of the biggest NV Biased/Nvidiot on the internet...

Don't bash members.

tvlad
08-23-04, 08:40 PM
Just finished doom 3, now i'm going to delete it and give absolutely no damn about future doom 3 drivers, that's until some more games appear that use doom's engine and that i happen to play, but between playing mud and learning for some exams, it's hard to see how i'll find the time :D

superklye
08-24-04, 12:17 AM
As does you're whole name Ass i (ee) 9.....Assinine.

Hmm. You said it buddy.

And for clarity:-

FanATIc - ATI + Fanatic == Enduring ATI supporter

NvIDIOT - NVIDIA + Idiot == A supporter of NVIDIA with lowered intelligence.

Now unless you're truely assinine, I'm sure you can see why some might take offence.

If you can can't. Eat me.


hahahaha

Assi9
08-24-04, 11:11 AM
As does you're whole name Ass i (ee) 9.....Assinine.

Hmm. You said it buddy.

And for clarity:-

FanATIc - ATI + Fanatic == Enduring ATI supporter

NvIDIOT - NVIDIA + Idiot == A supporter of NVIDIA with lowered intelligence.

Now unless you're truely assinine, I'm sure you can see why some might take offence.

If you can can't. Eat me.

:lol2:

Ok so, would you feel better if I equated fanATIc to ATIDIOT? Would you feel better now?

http://www.babyandcompany.co.za/johnsons/tears.jpg
:clap:

Assi9
08-24-04, 11:41 AM
What exactly, pray tell, is offensive about fanATIc? How is that demeaning anyone?

It isn't, and neither is Nvidiot. Both terms are commonly used so often to describe supporters of ATI or Nvidia. Get with the times...

What I meant by "furthering your cause" was making friends here. Great strategy you've been using so far. :rolleyes:

Because you know that my overall strategy in life is to make friends behind a keyboard and on these discussion boards...

http://www.gottaproperty.fsbusiness.co.uk/images2/newsflash.gif
You must be Psychic!

Everyone I would like to nominate Superklye as the NVNews OFFICIAL Resident Psychic!!

I can vouch for him, his psychic powers are so vast that he was able to decode my life-long cause of 'making friends here'

mezkal
08-24-04, 12:13 PM
:lol2:

Ok so, would you feel better if I equated fanATIc to ATIDIOT? Would you feel better now?


Meanwhile back to your summation of Kyle's psychic powahs!!

I'm not psychic and I'll bite : -

What exactly ARE you trying to ACHEIVE in this thread?

jimmyjames123
08-24-04, 12:31 PM
And for clarity:-

FanATIc - ATI + Fanatic == Enduring ATI supporter

NvIDIOT - NVIDIA + Idiot == A supporter of NVIDIA with lowered intelligence.

Now unless you're truely assinine, I'm sure you can see why some might take offence.

That's why I prefer to use the term ATIdiot. Only seems fair to me, given the NV terminology used.