praydog / REFramework

Scripting platform, modding framework and VR support for all RE Engine games
https://cursey.github.io/reframework-book/
MIT License
2.92k stars 357 forks source link

UI blurry (pd-upscaler) #670

Open AJ-316 opened 1 year ago

AJ-316 commented 1 year ago

The low resolution upscaling causes the UI to look blurry and has ghost trails. Potential Cause: Upscaler checks for UI Layer's movement relative to world and as the camera moves the UI leaves trailing effect. For example if the camera moves to right side the subtitle text (and rest of the UI) will have trails on its left side.

Grammernatzi commented 1 year ago

Currently this is because it seems to ignore layers and just applies upscaling to the entire image. I'm not sure if this can be improved, but it would be nice.

TeTr-a commented 1 year ago

Perhaps worth noting that this also happens when applying DLAA, not just for DLSS upscaling

Grammernatzi commented 1 year ago

A tip I've found to help mitigate things is to turn on DLAA and not use DLSS settings, and instead change the image quality setting. At 1440p with 80% image quality, this still looks very good but the UI isn't nearly as blurry as quality mode DLSS. It's still a bit blurry, but it's probably the best solution for now. So far it looks pretty good: image

If you're on AMD or Intel, I'm not sure if there's a similar setting for XeSS, but it's worth giving a shot I suppose.

TeTr-a commented 1 year ago

Thanks for the tip, this works well but still leaves the ghosting problem. I've found that the "Jitter" setting seems to remove the ghosting entirely, but then it seems like the AA isn't working at all. Tweaking the Jitter X and Y values produced some positive results for me.

Grammernatzi commented 1 year ago

What jitter X and Y worked the best for you? I haven't messed with it much yet as I find the current settings acceptable enough to not fiddle with more (there is still a bit of UI jitter); I have motion blur off, I don't know if you have it on.

TeTr-a commented 1 year ago

I've actually decided to just stick with the default jitter X and Y settings. changing them did remove ghosting, but it made the overall image very jagged. Motion Blur is disabled, and same with Bloom, which actually fixes the flickering lights issue present with the upscaler as well.

I hope it will be possible to fix the UI issues with the upscaler. REFramework already has options to disable/hide UI which makes me think that it shouldn't be too difficult to tell the upscaler to ignore the HUD. But I really have no idea, just hopeful! DLSS/DLAA is better than any of the options made available by Capcom, if this UI issue gets solved it is perfect.

TeTr-a commented 1 year ago

Good morning Gremmernetzi! I recommend you (and anyone else reading this thread) to download and use the latest version of "DLSSTweaks".

It seems that RE Engine games don't play well with DLAA running at full resolution, so this tool will allow you to offset the resolution by -1, as show below.

AEC3W9w

This change has almost entirely removed any and all ghosting from RE4 for me. There is no longer a need to render at a lower image quality either, looks and feels fantastic. Hope this helps!

Grammernatzi commented 1 year ago

Well, I want to run at a lower image quality for better framerate, that's why I wanted to use DLSS, since I'm running at 1440p and want a higher framerate for my 144hz monitor. From what I'm seeing, this only applies to DLAA? But, the image quality thing should still work, I imagine.

Also, installing that didn't get rid of the UI ghosting for me. It still happens, even with just DLAA.

TeTr-a commented 1 year ago

Yeah same, I want to use DLSS. Even at Quality level it's like a 40~50% increase in performance but the UI issues make it unusable for me.

In case you didn't, you have to edit the dlsstweaks.ini and change the resolution offset manually.

Grammernatzi commented 1 year ago

I did, and I put the .dlls + ini in the folder. Dunno if there's anything else I need to change, but, oh well. I even did the signature override and restarted my PC after for good measure.

TeTr-a commented 1 year ago

Very sorry it did not work for you then :(

It didn't completely remove the ghosting for me, but it is very very good now.

You have to be running dlss 3.1.1 or newer, 2.5.1 will not work with DLSSTweaks.

I also edited the ini to force DLAA no matter what DLSS setting I have selected, pictured below.

notepad++_5ZxzjoyMKk

A good way to see if DLSSTweaks is working is to force DLAA through the ini, and then change the DLSS quality settings in REFramework; there should be no change in quality level.

Grammernatzi commented 1 year ago

Setting ForceDLAA helped. There's still some jitter but it's much better now. And now I don't have to worry about resetting it every time I boot up the game.

krittinen commented 1 year ago

A tip I've found to help mitigate things is to turn on DLAA and not use DLSS settings, and instead change the image quality setting. At 1440p with 80% image quality, this still looks very good but the UI isn't nearly as blurry as quality mode DLSS. It's still a bit blurry, but it's probably the best solution for now. So far it looks pretty good: image

If you're on AMD or Intel, I'm not sure if there's a similar setting for XeSS, but it's worth giving a shot I suppose.

Forcing DLAA does do the trick but then the resolution scaling setting doesn't work and it always renders at full res

Grammernatzi commented 1 year ago

That's why you turn down image quality in the game itself. DLAA will help upscale it. This way the UI is unaffected. It looks far better than any of the options presented in the game itself.

krittinen commented 1 year ago

That's why you turn down image quality in the game itself. DLAA will help upscale it.

Which is why I said, the ingame resolution scaler does not work when I have DLAA forced, it will still render at 100% scale.

Grammernatzi commented 1 year ago

It seemed to work for me, I had a noticeable frame rate increase. I will check when I get back ingame later.

Grammernatzi commented 1 year ago

Huh, you are right, it seemed to stop working. I wonder if something changed that?

krittinen commented 1 year ago

Huh, you are right, it seemed to stop working. I wonder if something changed that?

Wonder if it's a change in version, I'm using REFramework build 0eeadf2 and DLSS 3.1.11

zaphellyn5467 commented 1 year ago

hope they fix this would be great🙂

Filoppi commented 1 year ago

Shouldn't the pd upscaler just hook to where Resident Evil 4 FSR is done and replace it with DLSS? It seems like now it's done after post processing and UI, which is kind of a dead end of TAA, but the game native FSR implementation is certainly done before that. In many games it's possible to replace DLSS with FSR 2, so I guess we could do the opposite here.

praydog commented 1 year ago

Shouldn't the pd upscaler just hook to where Resident Evil 4 FSR is done and replace it with DLSS? It seems like now it's done after post processing and UI, which is kind of a dead end of TAA, but the game native FSR implementation is certainly done before that. In many games it's possible to replace DLSS with FSR 2, so I guess we could do the opposite here.

Game's you're referring to with replaceable FSR are only because they come with the FSR DLL which is easily replaceable on disk. That's not the case here. The devs (or AMD...?) have decided to bake it into the executable itself, making replacing the implementation much harder and most likely moot, there is a lot of jitter/shimmer with FSR2 in this game (especially on foliage) which is not present when using this mod's version of FSR2.

Point being those visual bugs (jitter/shimmer, not the UI bugs) would most likely be present if FSR2 was replaced perfectly with DLSS like you're suggesting, so trading one issue for another.

Filoppi commented 1 year ago

All the issues would likely be fixed. Possibly it doesn't matter about the FSR dll being baked in, it would likely still be possible to hook into the engine upscaling calls and redirect them to DLSS instead. I guess that's harder to do though.

praydog commented 1 year ago

UI just needs to be isolated. I already have a general idea of where this is happening, just more reverse engineering has to be done on how the game is rendering it to a specific render target.

praydog commented 1 year ago

A little update on this:

I've figured out how to isolate the UI (at least in SF6, it should transfer to RE4). This completely removes the jittering and ghosting on the UI, as well as the blurriness (though it seems like the fonts are still lower res). There are still some issues I'm working out with the color looking too dark on the composited UI, and issues with some depth-aware UI elements.

It's not released yet, but is looking promising.

santiphap-luml commented 10 months ago

Any updates?

goat9988 commented 9 months ago

So any update about the UI blurry problems?

B-Wilhelm commented 8 months ago

My dog

brad86m commented 8 months ago

Patiently waiting on news for the UI fixing. DLAA is so lovely to have in this terrible engine, but the UI getting messed up does hurt the overall presentation and finish.

I really miss Capcom's MTFramework. Now that was one sublime engine.

Vladabdf commented 1 month ago

I am also curious, as it's been over a year now, if there has been any progress on this matter.

AJ-316 commented 1 month ago

For anyone it still is not working

Try running the game in borderless window, that somehow nearly fixes it

VladimirGolosin commented 1 week ago

@praydog have you managed to do it?

qvattr0 commented 4 days ago

@praydog Any updates on isolating the UI?