1

so i'd like to make an old game look better on newer video drivers using modified d3d9.dll which will be in main games parent directory.

Several things changed in drivers with the advent of 400 series nvidia cards (maybe amd though I've not confirmed) that otherwise made older games look worse by default. The changes were (paraphrasing from info kindly provided via PM on nvidia forum):

As of 400 series Geforce Cards and associated nvidia drivers there arose excessive pixelation on some textures when scene is in motion in old DirectX 9 games.

For card lower than Fermi based (pre 400 series), driver reads following options:
QUALITY_ENHANCEMENTS (Texture filtering - Quality)
PS_TEXFILTER_DISABLE_TRILIN_SLOPE (Texture filtering - Trilinear optimization)
PS_TEXFILTER_BILINEAR_IN_ANISO (Texture filtering - Anisotropic filter optimization)
PS_TEXFILTER_ANISO_OPTS2 (Texture filtering - Anisotropic sample optimization)
PS_TEXFILTER_NO_NEG_LODBIAS (Texture filtering - Negative LOD bias)

Of these the the following are now ignored in newer drivers:
PS_TEXFILTER_BILINEAR_IN_ANISO (Texture filtering - Anisotropic filter optimization)
PS_TEXFILTER_NO_NEG_LODBIAS (Texture filtering - Negative LOD bias)

In english, 3 issues:

  1. Anisotropic filtering doesn't apply to some textures.

  2. Anisotropic filtering doesn't apply to textures that uses negative LOD. The setting "Texture filtering - Quality" - "High quality" should apply AF to textures with negative LOD, but this option is partially broken, so it does not do this. Only 32-bit DX9 driver is broken (i.e. all 32bit DX9 games, most were 32bit).

  3. The setting "Texture filtering - Negative LOD bias" - "Clamp" is completely removed from the driver, but still exists in the control panel as a placebo.

While I was able to source a method to fix this issue on windows 7 (though I havent had chance to test extensively to confirm it), the relevant dll that needs to be modded is incompatible with win XP.

My thinking is, if I can insert a modded d3d9.dll in the games main directory to address these issues it will be more modular & independant of OS requirements.

I was able to source a d3d9.dll that had been hex edited to ignore custom lod calls from the game (in turn forcing LOD to 0) but forcing AF would be nice addition. I've discovered relevant call function is SetSamplerState.

So how would one go about making a wrapper for d3d9.dll? I wouldn't have faintest idea where to start...

cheers

shorterxp
  • 19
  • 1

1 Answers1

0

I have found a solution to this, basically someone with insider knowledge of modifying directX9 files supplied me a set of relevant files, d3d9.dll, d3d9x_24 and d3d9x_25.dll that force AF x 16 to all textures in DX9 games (re-enabling visuals seen when game was concieved).

shorterxp
  • 19
  • 1
  • Pretty sure you can just force enable all this stuff in the NVIDIA Control Panel or AMD Catalyst. It has options to force graphic features and override the graphic settings that are normally available in the games. No programming required. This can be used to both improve graphics or performance of games. (ie. if you want to run a dozen EVE Online clients simultaneously you can do some crazy tuning there that will let this happen smoothly, as well as enable anti-aliasing in games that don't support that etc.). – Havenard Mar 14 '20 at 04:24
  • I tried but to no avail. This is because, as stated in the question, the following bits are now ignored in newer drivers entirely: PS_TEXFILTER_BILINEAR_IN_ANISO (Texture filtering - Anisotropic filter optimization) PS_TEXFILTER_NO_NEG_LODBIAS (Texture filtering - Negative LOD bias) – shorterxp Mar 15 '20 at 12:19
  • Do you, by chance still have those files? I would like to force AF on a DX9 game as well – oneNewbieCoder Feb 14 '23 at 14:18
  • I will have a look and get back to you. What OS ? – shorterxp Feb 15 '23 at 18:59