Jump to content
The Dark Mod Forums

Humus Doom 3 ATI "fix" and Modern Shader mods


nbohr1more

Recommended Posts

Shortly after Doom 3 was released, one of the best Demo coders out there, Humus, found evidence that part of Doom 3's lighting interaction was originally planned to be done via shader math instead of via texture lookup. Humus re-enabled this method and modified the way it worked so that ATI hardware gained significant performance.

 

This change has been incorporated into ATI's driver since then and I suspect that this inclusion is the reason why Catalyst AI causes so much havok for things the the Parallax Mapping mod and JC Denton's HDR work...

 

I have occasionally corresponded with Humus over the years but would not really consider myself "connected"... nevertheless I have sent an appeal to him to look into this ongoing work and provide is ATI specific OpenGL expertise... (here's hoping... :laugh: )

 

BTW you really should check out his tech demo's:

 

http://www.humus.name/index.php?page=3D

 

My apologies if this has already been broached earlier or elsewhere, I know that this is some old stuff.

 

 

References:

 

http://forum.beyond3d.com/showthread.php?t=12732&highlight=Humus+Doom

 

http://www.team5150.com/~andrew/carmack/johnc_interview_2004_Interview_with_id_Softwares_John_Carmack_on_Doom3.html

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Actually, looking back...

 

The "Light Trails" demo seems relevant especially because of the number of candles in TDM? :

 

http://www.humus.name/index.php?page=3D&ID=55

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

He's got page after page of interesting things. Here are more in case people are lazy to check:

 

volumetric fog

dynamic lightmapping

game engine

soft shadows

 

None of which require DX10. And that's from only the first few pages of mods. It's a shame that since he's working professionally, he probably wouldn't have any time or interest in TDM.

Link to comment
Share on other sites

Humus spoke to the ATI guys shortly after showing this apparent vendor specific optimization, ATI then just added this as a quirk case to the driver, if you're not using Cat drivers from like 2004, none of this will benefit you as its still included in the modern driver.

Link to comment
Share on other sites

At the very least JC Denton et al. will have to "code around" what has been done... Humus may have better ideas (in general) about how to achieve what you guys want from ATI hardware

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I believe one or two things happen when ATI's driver uses Humus's fix:

 

1) Any shader that inherits data from the replaced texture lookup will obviously be missing that data

 

2) Any new shader will be "shaded" by Humus's shader inside the ATI driver (thus the math will be screwy)

 

The most troubling idea is that ATI may be dynamically applying this shader depending on the scene... :(

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

(actually a more troubling idea would be that ATI took the "spirit" of this change as inspiration and replaced as many of Id's shaders as possible with a variety of "optimized shaders...") :(:(:(

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Huh, they only do it in one area...

Both nvidia and amd use quirks to speed up stuff in doom3, finger pointing does nothing.

 

Anyway, I have a support ticket for the issue, I could go poke them again but they seemed to know what the cause was and said they were revising Cat AI for older games at the time... but that was 2-3 months ago, lemme see again.

Link to comment
Share on other sites

While we wait for ATI to fix these things, I thought it would be useful for the actual author of the change to offer alternative ways to modify Doom 3's shaders and interactions. (and maybe offer ATI optimized OpenGL advice in general...).

 

But, yeah, the above speculation about "other shaders" is merely my own paranoia...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

It's a shame that since he's working professionally, he probably wouldn't have any time or interest in TDM.

 

Yup, he was gracious enough to reply at least... Humus does not have the time... We will have to wait for ATI

 

(or live with having ATI users disable Catalyst AI...) :(

 

I'll post at Rage3d to see if there's a registry key to disable this code... :huh:

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

(or live with having ATI users disable Catalyst AI...) :(

 

I don't think that's a bad outcome really. I prefer my graphics drivers to do what the game renderer actually tells them, not to second-guess what they should be doing based on special-case hacks from previous versions of the same game.

Link to comment
Share on other sites

I was really hoping Humus would gain interest in this project in general as he is the master of knowing how to squeeze performance out of ATI's OpenGL ICD (contrary to most of the rest of the industry, he actually claims ATI has a SUPERIOR OpenGL implementation... while this is debatable, someone with that kind of speciality is rare)...

 

From his generic reply, I get the impression his secretary may have answered me :laugh: (so much for the little people)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 4 months later...

Download link -

 

(when i bloody find it)

 

Found this info:

 

Yes it's another Doom3 thread.
****** Revision II **********

This one has helped me the most
Download this file:
http://esprit.campus.luth.se/~humus/temp/doom3PerformanceTweak.rar

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.

*original post (http://www.beyond3d.com/forum/viewtopic.php?t=14874&postdays=0&postorder=asc&start=0)

I can't tell you how much this has helped with my setup.:cool:

Autoexec.cfg this adjusting settings for your video and system RAM. Items with "//" are commented out and do not load. Uncomment them for them to activate.

set image_usePrecompressedTextures "1"
set image_useNormalCompression "2"
---------
set image_downSizeBumpLimit "1024"
set image_downSizeBump "1" //enables above
-----
set image_downSizeLimit "1024"
set image_downSize "1" //use to enable above
------------
set com_videoRam "256" (adjust according to video RAM)
set r_usePortals "1" //use portals for area culling

//In game AF
set image_anisotropy "2"

//level and room loading tweaks
set image_useCache "1" 
set image_cacheMegs "256" (adjust according to video RAM) 
set image_cacheMinK "20480"

set r_displayrefresh "85"
set g_doubleVision "1"

//set image_filter "GL_LINEAR_MIPMAP_NEAREST"
//seta s_force22kHz "1" //Lower sound quality

//muzzle flashes not working fix
//seta g_decals "1"
//seta g_projectileLights "1"
//seta g_muzzleFlash "1"


Try adding these to the Doomconfig.cfg

seta r_useShadowCulling "1" //added
seta r_useCulling "2" //added
seta image_preload "1"



***Revised***
For starters here are a few valuble threads on tweaking Doom3. Rather than regirgitate content I'll just link them here so the original posters get credit for their findings:

http://www.beyond3d.com/forum/viewtopic.php?t=14874&postdays=0&postorder=asc&start=0
*This one is a MUST for ATI users. Caramack himself verified that it does indeed work.


http://ucguides.savagehelp.com/Doom3/FPSVisuals.htm
(explanation of commands et al)

http://www.rage3d.com/board/showthread.php?t=33773634&page=1&pp=30


*important*

It's been recently discovered that the "PK tweak" does not work at all. 
Another thing that's come up is editing the DoomConfig.cfg file may not work either. Many people are saying that it is merely overwritten. Now I've seen first hand changing existing values in the file have a direct impact on the game. So it seems that added lines are ignored. The work around for this is to create an autoexec.cfg and place it into your Base file. There's info on this in the first and third link.


Please build on these if you so choose, or correct any errors they may contain. 

 

and this

 

 [img=http://www.softwaretipsandtricks.com/forum/images/icons/icon4.gif] [b]Doom 3 - Performance Tweak[/b] Apparently this works - I am yet to try it. Will give it a go tonight and let u know what happens! After making these adjustments, people have reported increases of up to 30 fps. Worth a go. Just backup the cfg file first.

In your DOOM 3 directory, find "DoomConfig.cfg" (x:\Program Files\Doom 3\base). 
Open DoomConfig.cfg in Notepad.

Find the lines:

seta image_cacheMegs "32" (May be "20" on some computers)
seta image_cacheMinK "(Not sure which number thats supposed to be here"
seta image_useCache "0"

anyway, change the settings to the following:

seta image_cacheMegs "xxx" (xxx - Half the number of you RAM, so if you have 512 mb RAM, you should put 256 here, 1024 - 512 etc..)
seta image_cacheMinK "20480"
seta image_useCache "1"

seta image_useCache "1" - This enables the memory cache tweak, if this is set to 0, it would be disabled, logically..

seta image_cacheMink "20480" - Im not 100% sure what this does, i think it has something to do with the minimum use of cache in Kilobytes... Anyway, i heard this is the number it should be on..

seta image_cacheMegs "xxx" - The amount of ram the program should use (In this case, Doom 3). I advise you only to set this number to the half of the total RAM you have, or it may take alot of CPU power and that will result in the occational 3 - 5 second lag when you open doors and stuff.

Edited by Bikerdude
Link to comment
Share on other sites

  • 4 weeks later...

At lease one more of Humus's concepts has been tried in Doom 3

Ambient Aperture Lighting

 

 

Sikkpin claimed to have tried it in one of his Id Tech 4 shader packs but found it required a very specific normal map to work (too finicky):

 

Sikkpin shaders

 

(not the Test 5 stuff)

 

Not that this is a technique I have any big concern about, I just think it's cool to know that this stuff can be done at all. (Plus the pack has a nice library of lighting models to play with...)

 

I'm sure that folks like rebb and JC Denton have played with this stuff so it's kinda old hack but to me it's an interesting find anyway just for the Humus\Sikkpin connection.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...