Lyall / MGSHDFix

A fix that adds custom resolutions, ultrawide support and much more to the Metal Gear Solid Master Collection.
MIT License
374 stars 8 forks source link

Anisotropic Filtering Setting Doesn't Quite Work #72

Closed LethalPlacebo closed 7 months ago

LethalPlacebo commented 7 months ago

For a long time, I was forcing 16x AF for MGS2 and MGS3 through my GPU control panel since I had been doing it before these fixes. I decided to turn that off and rely on the AF provided by the fix, but it doesn't seem to work properly. I have it set to 16 samples, the default, but in-game it seems more like 4 samples or 8 at most.

Below is a comparison, the first pic using 16x AF by relying on the fix, the second pic using 16x AF as forced through the GPU control panel. It's especially noticeable on the ground near Snake and Eva. 20231130163517_1 20231130204639_1

emoose commented 7 months ago

Hm, on my side comparing driver AF 16x to mod version seems pretty much the same, I've only really tested in the starting area though, have you noticed this through the whole game or was it just that cutscene?

Could you check your log file to see if any aniso stuff is mentioned too? If it's being activated properly it should say something like

dllmain.cpp:1147  INFO| MGS 2 | MGS 3: Anisotropic Filtering: gpRenderBackend = 0x7ff614e649d0
dllmain.cpp:1151  INFO| MGS 2 | MGS 3: Anisotropic Filtering: Hook length is 15 bytes
dllmain.cpp:1152  INFO| MGS 2 | MGS 3: Anisotropic Filtering: Hook address is 0x7ff613305d94

One thing I did notice, there seems to be more calls to ::SetTexture than to ::SetTextureFilter in the code, so looks like certain textures do get setup without any filter attached, meaning our aniso stuff would have no effect, wonder if maybe I've just been lucky testing in that starter area and maybe it doesn't work in others...

LethalPlacebo commented 7 months ago

Sure, here are the lines from my log file, I will also attach the file itself:

dllmain.cpp:1147 INFO| MGS 2 | MGS 3: Anisotropic Filtering: gpRenderBackend = 0x7ff788bf49d0 dllmain.cpp:1151 INFO| MGS 2 | MGS 3: Anisotropic Filtering: Hook length is 15 bytes dllmain.cpp:1152 INFO| MGS 2 | MGS 3: Anisotropic Filtering: Hook address is 0x7ff787095d94

Yes, I checked the starting area as well which is where I noticed the issue. I decided to watch the cutscene from the screenshots I posted above (this is near the end of the game) in the demo theater to see if it affected other areas as well. I have not played through the whole game relying only on the AF in the fix itself, but I assume all areas throughout the game are like this.

MGSHDFix.log

emoose commented 7 months ago

How are you enabling the driver AF? Though NVCP or do you use a different GPU? If it's NVCP, can you check what AF option you picked to disable the driver AF?

With NVCP there's two options there that disables it, Application controlled and Off, if Off is picked that would force AF to be disabled despite what mod tries to do, for the mod AF to work it has to be Application controlled afaik, maybe worth checking.

LethalPlacebo commented 7 months ago

Yes, I was very careful about this because I know it's possible to completely force off settings in NVCP. I made sure to choose "Use Global Setting (Application Controlled)"

I'll try setting to to that again and give the game another go to see if anything has changed.

image

LethalPlacebo commented 7 months ago

Hi, I just tested it again and set the Anisotropic Filtering in NVCP as shown above (enabling this setting in NVCP also changes two other options lower down in the list, I made sure to return those to default as well) but this time I did an extra step: I removed MGS3 from the NVCP program list. You may notice in my screenshot that the "Restore Profile" button is greyed out. I'm pretty sure this is because no Nvidia graphics profile was ever made for the Master Collection, so before this fix was available I manually added 16x AF, I had to add it manually. For some reason, the extra step of removing it allowed the mod's 16x AF to work!

I'll close this issue now. Just for completion's sake, here's 16x AF as forced through the mod: 20231202144717_1