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:
Anisotropic filtering doesn't apply to some textures.
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).
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