RyanJGray / aliasIsolation

Anti-aliasing mod for Alien: Isolation
The Unlicense
27 stars 0 forks source link

Cannot inject in Steam version (FIXED) but now blurry smeary #9

Open whosnick opened 1 year ago

whosnick commented 1 year ago

I experienced problems with the original build recently (movement is all blurry and smeary - any idea why?). So I wanted to try this build, but copying the "mods" folder and the two files to my AI directory and launching the game does not seem to do anything. I cannot see the AliasIsolation logo during loading either. Is there anything I am doing wrong? I am on Steam Windows 11 Nvidia 3080 newest drivers.

I did a complete reinstall of Alien Isolation. So in the folder where AI.exe lies, there is the "mods" folder and the two aliasIsolation.asi and winmm.dll right? Then just launch AI through Steam without any params? What about the aliasIsolation.pdb? It is not mentioned in the instructions.

Thanks for your help!

whosnick commented 1 year ago

Nevermind! I figured it out.

The blurry and smeary movement of the original is fixed as well! Great work and thank you for preserving this gem of a mod!

RyanJGray commented 1 year ago

Hey, sorry for the delay in getting back to you, thanks for checking the mod out!

Good fix and good find, might just rename it to d3d11.dll for everybody as that should work on Windows 7+. Not sure why the winmm.dll injection method broke.

aliasIsolation.pdb is more useful for me when it comes to debugging the mod, it isn't necessary for the mod to work.

I'll update the docs and turn the beta into a proper full release too, there are still issues with the Epic Games port and GOG it seems.

Enjoy, feel free to report any suggestions or issues you run into, with the mod!

whosnick commented 1 year ago

After some days, the blurry smeary movement returned all the sudden. Same behavior as original build.

I did not change any settings. The injection still works, the "alias isolation" logo appears in the top-left corner. But I can immediately see it is not working correctly when the logo itself is plain white and aliased. When it is working, the logo appears anti-aliased and not quite as sharp if you know what I mean.

It is really strange because it stopped working from one day to the other without changing any settings. It seems to me like some protective mechanism from Steam / Windows 11 recognizes this mod after some time and just messes it up? Or some cache files that build up after some time and make it not work correctly anymore?

I tried deleting everything and reinstalling. But it seems to "remember" somehow and I now cannot get it to work with this build and the original build anymore.

One thing I have not tried is to use Steam non-beta since I am using the Steam beta client that has some new features. Not sure why this would cause to mod to behave this way though.

I hope we can figure this out, I am happy to help and provide any debug data needed.

whosnick commented 1 year ago

Opted out of steam beta programm and reinstalled steam and now it works again. Lets see for how long. Your newer 1.1.1 crashes to desktop though (created separate ticket for this).

On confusing thing I noticed: The readme in the .7z seems to be the old one from the original branch. Is this intended?

RyanJGray commented 1 year ago

Just had a read through this, very very strange behaviour. I was going to say that I am doing all my testing on Steam's regular branch, and didn't experience the same issue. Good spot with the Steam non-beta fix! Going to test it with the Steam beta branch later.

I wonder, if you disabled the Steam overlay for Alien: Isolation, if the problem would've went away. The mod doesn't really seem to like overlays, which does need fixed.

I was going to suggest, that perhaps there was a Windows 11 bug or an NVIDIA driver bug, but now that changing Steam branch fixed it, I'm not so sure.

Hmm, the readme shouldn't be the same as the old version, I see I made that release before I had published my updates to the readme, my bad!

Replied to your other ticket for 1.1.1, thanks for the report!

whosnick commented 1 year ago

Yeah since it worked with the steam beta before with overlay enabled (and stopped working correctly (blur) twice out of the blue), I am not sure yet if it was because of the beta or because of deleting and reinstalling steam.

Let's see of the problem reoccurs after some days.

whosnick commented 1 year ago

Ok I am able to reproduce this 100% now.

The blur came back when I tried again tonight. Here are screenshots how it looks:

https://imgur.com/a/HFYNKBK

Notice that these screens where taken while standing still and not moving the camera.

Now I figured I reinstall Steam again by opting back into the beta. So it installed the Steam beta client again and the blur was gone again:

https://imgur.com/a/E2Iortw

Notice the how different the Alias Isolation logo looks when it is not working.

So it only works exactly once. Next time I start the game, the blur is back.

Now I found a way to fix it everytime: When you go to Steam > Settings > Downloads > CLEAR DOWNLOAD CACHE and do that, Steam will quit, do something, and startup again, asking you to log in again. When I then start the game again the mod works without blur everytime, but only ONCE. So Steam must download something after clearing the cache when the game is started, causing the blur to appear on next start. Really strange, but at least 100% reproducable now for me.

I hope this helps and you have an idea how to narrow down the issue.

RyanJGray commented 1 year ago

That is strange, very strange. Great find though, this helps narrow it down a good bit.

I've only ever seen that happen, if the in-game anti-aliasing setting wasn't set to SMAA T1x (or when I updated the graphics math library, that the mod depends on). It happens in the original mod too, which is bizarre, because it was working before, and suddenly this has started happening...

I don't think that Steam on Windows caches shaders or anything like that, but still that fixes it... somehow, unless that clears out your Steam Cloud saved games and settings (temporarily).

RyanJGray commented 1 year ago

Notice the how different the Alias Isolation logo looks when it is not working.

Good spot! The effect that you see on the logo, is created by the chromatic aberration shader. It looks like that shader (or possibly multiple shaders) isn't/aren't being applied in the non-working screenshot, for some reason.

I might publish a debug version, which will output a load of spew in a console, about what Alias Isolation is doing in the background.

Would you mind telling me what graphics settings you're using in-game? I'm trying to replicate this and that would help ensure everything is relatively similar.

sentientapp commented 1 year ago

I have the same issue, including the difference in the logo, when Auto HDR is enabled in Windows 11. Disabling Auto HDR fixed it for me.

sentientapp commented 1 year ago

So it only works exactly once. Next time I start the game, the blur is back.

Now I found a way to fix it everytime: When you go to Steam > Settings > Downloads > CLEAR DOWNLOAD CACHE and do that, Steam will quit, do something, and startup again, asking you to log in again. When I then start the game again the mod works without blur everytime, but only ONCE. So Steam must download something after clearing the cache when the game is started, causing the blur to appear on next start. Really strange, but at least 100% reproducable now for me.

@whosnick do you have Auto HDR enabled in Windows 11?

PCGamingWiki states:

Games needs to be launched at least once before Auto HDR is activated.

This could explain why the mod only works once without blurriness after reinstalling or clearing cache. After the first run, Auto HDR is activated and the mod gets blurry.

whosnick commented 1 year ago

I have the same issue, including the difference in the logo, when Auto HDR is enabled in Windows 11. Disabling Auto HDR fixed it for me.

OMG that was it. Turning off Win11 Auto HDR for Alien Isolation fixes the blur.

Alien Isolation is absolutely gorgeous with Auto HDR enabled and it used to work flawlessly with AliasIsolation, since before the blur occurred on all build of this MOD, I used to play Alien Isolation with this combo for months.

Auto HDR + AliasIsolation make the game look like a modern remaster. It would be unfortunate if I had to keep it switched off for this game.

Edit: I will try SpecialK HDR injection and see if this works in combination with AliasIsolation as an Win11 Auto HDR alternative.

RyanJGray commented 1 year ago

This could explain why the mod only works once without blurriness after reinstalling or clearing cache. After the first run, Auto HDR is activated and the mod gets blurry.

Brilliant find! Completely forgot that feature was added to Windows 11, explains a lot. Microsoft don't seem to document how the Auto HDR feature works, which makes it tricky to figure out.

I'm going to do some tests on Windows 11, to try and narrow down what in the mod is breaking, Auto HDR could be messing with the DirectX hooks in some way.

It is surprising aliasIsolation doesn't throw any errors when this happens, but at least we know what triggers the bug now.

sentientapp commented 1 year ago

Microsoft don't seem to document how the Auto HDR feature works, which makes it tricky to figure out.

The best description I've found is the following post with accompanying video from the SpecialK forum:

How does (Windows) Auto HDR compares to Special K HDR?