PeterTh / gedosato

The Generic DownSampling Tool
GNU General Public License v3.0
464 stars 166 forks source link

Force texture filtering and any true AA from gedosato #67

Open v00d00m4n opened 10 years ago

v00d00m4n commented 10 years ago

There are many games such as FEAR 2, State of Decay, Resident Evil Revelations, Saints Row 2-4 etc, that has some problems such as some surfaces and espcially UI does not have any texture filtering or some geometry does not have any AA and this looks ugly and sometimes even forcing AA and AF from driver settings applet does not help to fix this.

For example UI of State of decay was designed for 720p resolution, in any other mode alost every UI element looks blocky, same with FEAR 2 and much more games i cant remember at the moment, in any Saints Row close and body changing overlay screens seems to be separate render targets and AA aint applied on them, same happens with RE Revelations 3D map which seems to be rendered in same resolution as on NDS without any AA.

If only Gedosato could force filtering of every texture surface, and force AA in every (or selected with some hashes) render target it would really help to fix such annoying issues. Som unified method of detection of render targets and forcing their resolution to be rendered in 2x 4x ... 32x resolutions or -2x -4x or exact resolution from config with forced filtering could help, some identification with hashes to include or exclude some specific render targets would help as well.

If such thing would be implemented we could, lets say render UI of State of Decay (not sure if usese separate render target however) in 1280x720p where it works right, and then upscale it with any filtering to actual resolution we use.

Also, while gedosato's primary usage is downsampling, using it as resident that allow to force any selected form of AA and AF for games that does not have AA and AF options would be really awesome feature. I mean right now all we can do - downsample and use SMAA or FXAA, which are not that good for having sharp and clean image, adding option that will allow to request and force any form of AA available to drivers (including TXAA) + some custom combos (i mean combos of MSAA + SSAA such as OGSSAA or SGSSAA) and extra AF would be really nice feature that will turn gedosato into ultimate AA and AF issue solving tool for any game.

PeterTh commented 10 years ago

This is all extremely hard to accomplish in a generic manner. If you want to do specific UI tweaks for individual games, the way to do it would be writing a plugin for that game.

v00d00m4n commented 10 years ago

You mean all of this or something specifi is extermely hard? I think at least forcing any real AA and texture filtration globally for everything in game could be done easily by you. Isnt it?

PeterTh commented 10 years ago

If it was easy to force "real AA" then why do you think even GPU vendors who have much more complete access than GeDoSaTo does need complex compatibility flags which still don't work right half of the time?

Texture filtering really is easy to enforce globally, but drivers can already do it.

awksie commented 10 years ago

"Clever" anti-aliasing is extremely complex to implement, especially when you're doing it outside the game engine's renderer. I've spent years working with NVIDIA's drivers forcing AA in a huge variety of titles, and most of the time, it just doesn't work very well. That's why GeDoSaTo exists; downsampling from a higher resolution (which is essentially super-sampling, just in reverse) is a very simple form of anti-aliasing, and even this 'simple' form is difficult to implement in modern deferred-render titles.

What you're asking is neither easy nor simple; it would be a herculean effort.

The problem with the UI elements in State of Emergency (and possibly FEAR) is that they are low-resolution sprites, which no amount of anti-aliasing or filtering would help. Maybe applying HQ4x to the sprite itself, but that doesn't really solve anything... and is virtually impossible to implement as a third-party anyway.

v00d00m4n commented 10 years ago

Texture filtering enforcement is a little strange now on Nvidia cards:

About 10 years ago when i played GTA 3 which had pixelated BMP skins for player model whenever i forced Aniso filtering in nvidia driver, it was 100% enabled globaly and pixelation was not present anymore. There was few more games and textures which used nearest filtering, but enabling AF and AA filtered them all. Some years later nvidida changed global override behavior (maybe for compatibility reasons to not screw up something that was intended to be unfiltered and pixelated), now it does not force filtering on every texture present in any game, it seems only enforcing it for textures that already requested at least linear filtering. Im not sure why behavior was changed, but im pretty sure there is an easy way to globally request filtering for every texture even if game engine does not do that.

For example it could be gone in generic manner same way like some of ENB features, there should be some sort generic routine that intercept all calls for texture rendering and replaces requested filtering\sampling method on fly or detect which request nearest point sampling (pardon my russian, here we use same word both for sampling and filtering so maybe my terminology in english does not mean what i actually mean). I mean there could be generic way to intercept and enforce IDirect3DDevice9::SetSamplerState method's D3DSAMPLERSTATETYPE and D3DTEXTUREFILTERTYPE parameters.