Booster les cartes graphiques ATI sous Doom III...

Statut
N'est pas ouverte pour d'autres réponses.

medleouf

Touriste
Un dénommé Humus du forum de nos confrères Beyond3D dit connaître une manipulation pour augmenter les performances des cartes graphiques ATI jusqu'à 40% sous le jeu Doom III.

Il suffirait pour cela de modifier un fichier appelé pak000.pk4 présent dans le répertoire de Doom III à l'aide du logiciel WinRAR. Il serait ainsi passé d'une moyenne de 34 fps à 48 fps en 1280x1024.

Si l'opération vous tente, nous ne pouvons que vous conseiller de faire une sauvegarde du fichier avant de le modifier, si toutefois vous possédez le jeu...

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.

pcinpact.com
beyond3d
 

EL666

Elite
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.
Morron !

Au fait moi je ne touche pas à ca...
 

ketum

Touriste
Moi j ai boosté les perf avec les catalyst 4.9 beta ( deja tres stable pour une fois ) dispo sur materiel.be mais je testerai bien cette astuce histoire combiner les 2
 

[Mj]

King of the world
j'ai déja fait un thread avec des liens ou en parle de sa.Enfin soite.
 

Tiny

Touriste
j'ai essaye ce truc et ca fonctionne vraiment y a pas de miracle mais ca tourne mieux
 

mico

Elite
Hax tiny :eek:
 
[Mj a dit:
]j'ai déja fait un thread avec des liens ou en parle de sa.Enfin soite.
mon cher overcrash, t as mi la manip complete dans ton thread???
 

SpY_

Trolololololololo
plus simplement :

-Prendre ce fichier LA

pour l'installer , il suffit d'ouvrir le fichier "pk000.pk4" avec winrar et d'aller dans le dossier glprogs , vous n'avez plus qu'à placer le fichier "interaction.vfp"
 

Vinyx

Elite
Ca vaut tjr la peine d'essayer :arrow: THX pour l'info :wink:
 

smoka

Touriste
ca ne marche QUE pour les atis ?
 

SpY_

Trolololololololo
smokz- a dit:
ca ne marche QUE pour les atis ?
ca n augmente pas les perf des nvidia non mais tu pe tj essayer
 

[Mj]

King of the world
Zloupy@Kakashi a dit:
[Mj a dit:
]j'ai déja fait un thread avec des liens ou en parle de sa.Enfin soite.
mon cher overcrash, t as mi la manip complete dans ton thread???
Oui mon cher zloupy dans les liens que j'ai donne dans optimisation il explique exactement sa :)
 
[Mj a dit:
]
Zloupy@Kakashi a dit:
[Mj a dit:
]j'ai déja fait un thread avec des liens ou en parle de sa.Enfin soite.
mon cher overcrash, t as mi la manip complete dans ton thread???
Oui mon cher zloupy dans les liens que j'ai donne dans optimisation il explique exactement sa :)
v aller revoir ça tien, mais en passant, moi le winrar il crash qd j lui demande de remettre el fichier ... :'(
 

doog

Men of Mayhem
Salut alors , j'ai testé et oui ca marche je vois une hausse de fps non négligable c'est sur ...

celui qui veux j'ai déja fait le fichier transormer je peux lui send c un ptit fichié de 5ko :D

( cfg : ATI Sapphire 9800 pro )
 

Marco

[HOONIGAN]
ca marche c indéniable... je suis en 1024*768 avec les détails en supérieur et les options avancées à fond (à part les ombres) et j'ai senti nettement la différence après ca...
J'ai une X600XT 128Mb en PCIX
 

LifeNight

Elite
Merci beaucoup, j'ai pris le fichier de spiderx, now ca va chauffer sur doom 3
 

Bowman

2busy4u
Pourquoi je n'ai pas le fichier interaction.vfp?
 

Pecosbil

Polo Masta
Bowman a dit:
Pourquoi je n'ai pas le fichier interaction.vfp?

Tu sais lire l'anglais? '^^

C'est indiqué dans le post de brice, suffit d'ouvrir pak000.pk4 avec winrar et dans le répertoire de l'archive glprogs se trouve interaction.vfp.


Une autre optimisation consiste à décompresser les pk4 dans le dossier doom, mais ça j'ai plus la manip' exacte en tete.
 

Bowman

2busy4u
Non justement je ne lis pas parfaitement l'anglais :) merci quand même lol :D
 
Statut
N'est pas ouverte pour d'autres réponses.
Haut