(H)ybrid high-(Q)uality (A)nti-(A)liasing (HQAA)
- lordbean
- Topic Author
The point of having the optional features present in HQAA is that it saves some performance to be able to run commonly-used techniques from a single pass inside a shader that's already running anyway. It isn't really part of AA, yes, but that's why it's an optional feature. Everything in HQAA that isn't explicitly part of anti-aliasing can still be completely removed from the compiled shader by setting HQAA_ENABLE_OPTIONAL_TECHNIQUES to 0.
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- Illuzio
I have a problem in the game Dishonored, I can't use it (I checked and the problem exists also on older version of HQAA).
Here is the error message:
imgur.com/FZwG8AW
(Dishonored is DirectX9, 32 bits)
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
What could be happening, however, is an incompatibility with another shader in your list. If you start Dishonored with HQAA being the only shader in the library (just make a new folder and drop the other ones into it temporarily to try this), does it still throw an error? If not, you can also try taking the opportunity to disable all the additional features in HQAA you don't use, then try putting your normal shaders back into the list and see if there's still a problem.
Update: I can confirm HQAA is compatible with Dishonored using both legacy 4.9.1 and 5.0.2 DLLs. HQAA is an almost piggishly large shader though (due to integration of several other medium-large techniques as a single one) and this isn't the first time I've seen a weird incompatibility pop up with some other shader.
22:25:47:951 [13892] | INFO | Initializing crosire's ReShade version '4.9.1.1002' (32-bit) built on '2021-01-09 21:10:30' loaded from "C:\Games\Steam\steamapps\common\Dishonored\Binaries\Win32\d3d9.dll" into "C:\Games\Steam\steamapps\common\Dishonored\Binaries\Win32\Dishonored.exe" ...
22:25:47:974 [13892] | INFO | Registering hooks for "user32.dll" ...
22:25:47:974 [13892] | INFO | > Libraries loaded.
22:25:47:975 [13892] | INFO | > Found 14 match(es). Installing ...
22:25:47:997 [13892] | INFO | Registering hooks for "ws2_32.dll" ...
22:25:47:998 [13892] | INFO | > Libraries loaded.
22:25:47:998 [13892] | INFO | > Found 8 match(es). Installing ...
22:25:48:020 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\d2d1.dll" ...
22:25:48:021 [13892] | INFO | > Delayed.
22:25:48:021 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d9.dll" ...
22:25:48:021 [13892] | INFO | > Delayed until first call to an exported function.
22:25:48:022 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d10.dll" ...
22:25:48:023 [13892] | INFO | > Delayed.
22:25:48:023 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d10_1.dll" ...
22:25:48:024 [13892] | INFO | > Delayed.
22:25:48:024 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d11.dll" ...
22:25:48:025 [13892] | INFO | > Delayed.
22:25:48:025 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d12.dll" ...
22:25:48:025 [13892] | INFO | > Delayed.
22:25:48:025 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\dxgi.dll" ...
22:25:48:026 [13892] | INFO | > Delayed.
22:25:48:026 [13892] | INFO | Registering hooks for "C:\WINDOWS\system32\opengl32.dll" ...
22:25:48:027 [13892] | INFO | > Delayed.
22:25:48:027 [13892] | INFO | Initialized.
22:25:48:751 [13892] | INFO | Redirecting RegisterClassExW(lpWndClassEx = 01B8E4F0 { SteamWinsockInitFakeClass_1 }) ...
22:25:48:751 [13892] | INFO | > Adding 'CS_OWNDC' window class style flag to 'SteamWinsockInitFakeClass_1'.
22:25:49:519 [13892] | INFO | Redirecting Direct3DCreate9(SDKVersion = 32) ...
22:25:49:523 [13892] | INFO | Installing export hooks for "C:\WINDOWS\system32\d3d9.dll" ...
22:25:49:523 [13892] | INFO | > Found 9 match(es). Installing ...
22:25:49:610 [13892] | INFO | Installing delayed hooks for "C:\WINDOWS\system32\dxgi.dll" (Just loaded via LoadLibrary("ddraw.dll")) ...
22:25:49:610 [13892] | INFO | > Found 5 match(es). Installing ...
22:25:49:759 [13892] | INFO | Redirecting Direct3DCreate9(SDKVersion = 32) ...
22:25:50:093 [13892] | INFO | Redirecting RegisterClassExW(lpWndClassEx = 01B8FC64 { LaunchUnrealUWindowsClient }) ...
22:25:52:021 [13892] | INFO | Redirecting IDirect3D9::CreateDevice(this = 17A66A38, Adapter = 0, DeviceType = 1, hFocusWindow = 000B095A, BehaviorFlags = 0x152, pPresentationParameters = 01B8D94C, ppReturnedDeviceInterface = 01B8D9BC) ...
22:25:52:022 [13892] | INFO | > Dumping presentation parameters:
22:25:52:022 [13892] | INFO | +
+
+
22:25:52:022 [13892] | INFO | | Parameter | Value |
22:25:52:022 [13892] | INFO | +
+
+
22:25:52:023 [13892] | INFO | | BackBufferWidth | 1600 |
22:25:52:023 [13892] | INFO | | BackBufferHeight | 900 |
22:25:52:023 [13892] | INFO | | BackBufferFormat | D3DFMT_A8R8G8B8 |
22:25:52:023 [13892] | INFO | | BackBufferCount | 1 |
22:25:52:024 [13892] | INFO | | MultiSampleType | 0 |
22:25:52:024 [13892] | INFO | | MultiSampleQuality | 0 |
22:25:52:024 [13892] | INFO | | SwapEffect | 1 |
22:25:52:024 [13892] | INFO | | DeviceWindow | 000B095A |
22:25:52:025 [13892] | INFO | | Windowed | FALSE |
22:25:52:025 [13892] | INFO | | EnableAutoDepthStencil | FALSE |
22:25:52:025 [13892] | INFO | | AutoDepthStencilFormat | 0 |
22:25:52:025 [13892] | INFO | | Flags | 0x1 |
22:25:52:026 [13892] | INFO | | FullScreen_RefreshRateInHz | 0 |
22:25:52:026 [13892] | INFO | | PresentationInterval | 0x1 |
22:25:52:026 [13892] | INFO | +
+
+
22:25:53:304 [13892] | INFO | Running on NVIDIA GeForce RTX 2060 Driver 497.9
22:25:53:306 [13892] | INFO | Recreated runtime environment on runtime 17D472F8.
22:25:53:849 [00884] | INFO | Successfully loaded "C:\Users\lordb\Desktop\ReShade\Core\HQAA.fx".
22:25:53:908 [13508] | INFO | Loading image files for textures ...
22:26:07:018 [13508] | INFO | Loading image files for textures ...
22:27:45:303 [13892] | INFO | Destroyed runtime environment on runtime 17D472F8.
22:27:45:306 [13892] | WARN | Reference count for IDirect3DDevice9 object 17C7CC80 is inconsistent.
22:27:46:375 [13892] | INFO | Exiting ...
22:27:46:375 [13892] | INFO | Uninstalling 42 hook(s) ...
22:27:47:451 [13892] | INFO | Finished exiting.
22:29:36:514 [13032] | INFO | Initializing crosire's ReShade version '5.0.2.1429' (32-bit) built on '2022-02-06 05:02:41' loaded from "C:\Games\Steam\steamapps\common\Dishonored\Binaries\Win32\d3d9.dll" into "C:\Games\Steam\steamapps\common\Dishonored\Binaries\Win32\Dishonored.exe" ...
22:29:36:537 [13032] | INFO | Registering hooks for "user32.dll" ...
22:29:36:537 [13032] | INFO | > Libraries loaded.
22:29:36:538 [13032] | INFO | > Found 14 match(es). Installing ...
22:29:36:560 [13032] | INFO | Registering hooks for "ws2_32.dll" ...
22:29:36:560 [13032] | INFO | > Libraries loaded.
22:29:36:560 [13032] | INFO | > Found 8 match(es). Installing ...
22:29:36:582 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\d2d1.dll" ...
22:29:36:583 [13032] | INFO | > Delayed.
22:29:36:583 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d9.dll" ...
22:29:36:583 [13032] | INFO | > Delayed until first call to an exported function.
22:29:36:583 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d10.dll" ...
22:29:36:584 [13032] | INFO | > Delayed.
22:29:36:584 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d10_1.dll" ...
22:29:36:584 [13032] | INFO | > Delayed.
22:29:36:585 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d11.dll" ...
22:29:36:585 [13032] | INFO | > Delayed.
22:29:36:585 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d12.dll" ...
22:29:36:585 [13032] | INFO | > Delayed.
22:29:36:586 [13032] | INFO | Registering hooks for "C:\WINDOWS\system32\dxgi.dll" ...
22:29:36:586 [13032] | INFO | > Delayed.
22:29:36:586 [13032] | INFO | Registering hooks for "vrclient.dll" ...
22:29:36:587 [13032] | INFO | > Delayed.
22:29:36:587 [13032] | INFO | Initialized.
22:29:36:730 [13032] | INFO | Redirecting RegisterClassExW(lpWndClassEx = 01B8E4F0 { SteamWinsockInitFakeClass_1 }) ...
22:29:36:730 [13032] | INFO | > Adding 'CS_OWNDC' window class style flag to 'SteamWinsockInitFakeClass_1'.
22:29:37:408 [13032] | INFO | Redirecting Direct3DCreate9(SDKVersion = 32) ...
22:29:37:411 [13032] | INFO | Installing export hooks for "C:\WINDOWS\system32\d3d9.dll" ...
22:29:37:412 [13032] | INFO | > Found 9 match(es). Installing ...
22:29:37:486 [13032] | INFO | Installing delayed hooks for "C:\WINDOWS\system32\dxgi.dll" (Just loaded via LoadLibrary("ddraw.dll")) ...
22:29:37:487 [13032] | INFO | > Found 5 match(es). Installing ...
22:29:37:636 [13032] | INFO | Redirecting Direct3DCreate9(SDKVersion = 32) ...
22:29:37:777 [13032] | INFO | Redirecting RegisterClassExW(lpWndClassEx = 01B8FC64 { LaunchUnrealUWindowsClient }) ...
22:29:39:589 [13032] | INFO | Redirecting IDirect3D9::CreateDevice(this = 17A46548, Adapter = 0, DeviceType = 1, hFocusWindow = 001E07A2, BehaviorFlags = 0x152, pPresentationParameters = 01B8D94C, ppReturnedDeviceInterface = 01B8D9BC) ...
22:29:39:589 [13032] | INFO | > Dumping presentation parameters:
22:29:39:590 [13032] | INFO | +
+
+
22:29:39:590 [13032] | INFO | | Parameter | Value |
22:29:39:590 [13032] | INFO | +
+
+
22:29:39:590 [13032] | INFO | | BackBufferWidth | 1600 |
22:29:39:591 [13032] | INFO | | BackBufferHeight | 900 |
22:29:39:591 [13032] | INFO | | BackBufferFormat | D3DFMT_A8R8G8B8 |
22:29:39:591 [13032] | INFO | | BackBufferCount | 1 |
22:29:39:591 [13032] | INFO | | MultiSampleType | 0 |
22:29:39:592 [13032] | INFO | | MultiSampleQuality | 0 |
22:29:39:592 [13032] | INFO | | SwapEffect | 1 |
22:29:39:592 [13032] | INFO | | DeviceWindow | 001E07A2 |
22:29:39:592 [13032] | INFO | | Windowed | FALSE |
22:29:39:593 [13032] | INFO | | EnableAutoDepthStencil | FALSE |
22:29:39:593 [13032] | INFO | | AutoDepthStencilFormat | 0 |
22:29:39:593 [13032] | INFO | | Flags | 0x1 |
22:29:39:594 [13032] | INFO | | FullScreen_RefreshRateInHz | 0 |
22:29:39:594 [13032] | INFO | | PresentationInterval | 0x1 |
22:29:39:594 [13032] | INFO | +
+
+
22:29:40:815 [13032] | INFO | Running on NVIDIA GeForce RTX 2060 Driver 497.9
22:29:46:372 [14304] | INFO | Successfully compiled "C:\Users\lordb\Desktop\ReShade\Core\HQAA.fx".
22:29:46:491 [05360] | INFO | Loading image files for textures ...
22:30:21:597 [13032] | INFO | Exiting ...
22:30:21:597 [13032] | INFO | Uninstalling 41 hook(s) ...
22:30:22:622 [13032] | INFO | Finished exiting.
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- EFermi
Standart AA (multisampling, no TSAA): imgur.com/2ricvLb
HQAA (almost no difference from MSAA): imgur.com/NNYfj3K
FXAA (decent, not 100% coverage, but at least it gives some result, but I don't like it for misinterpreting edge pixels quite often, causing pixel-sized bleed-ins/outs): imgur.com/l8wJZzU
Of course it is understandable that it may be difficult to produce high quality results without messing up FXAA-style, but corrently transparence AA (TSAA) is virtually nonexistent.
A brief example of close to how I want it to look like: imgur.com/VEkuNTV and imgur.com/zOCnCpK
(Achieved using 8K resolution via GeDoSaTo + in-game FXAA for smoothness ( imgur.com/8TOlDpc ). With all honesty, is still looks like $h1t. Even FXAA did a better job. With 100% scale it is possible to still see pixel-sized aliased dots here and there, mostly because GeDoSaTo's lanczos scaler, but also because classic 2x normal grid supersampling is not the best AA mode ever anyway. If I had an nVidia GPU I could've switched on 8x transparency supersampling via nVidia Inspector for better demonstration, but since AMD cannot into proper TSAA in DX9, this is the best I can show for an example. Maybe should've chosen a better suited game for such demonstration, but whatever.)
Please Log in or Create an account to join the conversation.
- EFermi
8x SSAA (the goal for every AA algo to achieve and what I wish for): imgur.com/VOfvrFc
SMAA T4x (despite having a temporal solution, it still fails to catch 'em all 1-pixel dots and lines): imgur.com/DHhfIcx
SMAA 1x: imgur.com/oDjZXrZ
HQAA (ultra preset, virtually no difference from SMAA in terms of transparency processing): imgur.com/5eD2ZEQ
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
I think you might also have missed the part where I said I'm not an experienced programmer (something I've mentioned several times now). HQAA isn't a new method of doing anti-aliasing. It has modifications you can't find in the original routines, true enough, but at its heart it's still running SMAA followed FXAA.
What you seem to be asking for is honestly more along the lines of NVIDIA DLSS.
Please Log in or Create an account to join the conversation.
- Illuzio
Here is the error (same as last time):
imgur.com/KuqREI5
Depth settings:
imgur.com/0tw0jmS
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Edit: I couldn't reproduce it with ReShade 5.0.2 (haven't tried 4.9.1 yet). Interestingly, the lines it's referring to are part of the optional debanding effect, but I don't see how a divide by zero is possible with the code being the way it is there. Try opening the preset file for the game (by default, ReshadePreset.ini in the game's folder) and place "HQAA_OPTIONAL_DEBAND=0" (without quotes) in the preprocessor definitions field right at the start of the file. If it still fails to compile, the actual error being thrown is probably a symptom rather than a cause.
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
18.0.6 pushed, which removes the optional debanding feature entirely. On further inspection of how the profiles were actually behaving followed by a lot of struggling with it, I've determined it doesn't fit well inside HQAA. There are probably more advanced debanding shaders out there anyway.
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- EFermi
Also, as I said, FXAA produced passable results on transparencies, it just wasn't accurate enough on edges, while HQAA as well as SMAA has the exact opposite issue - great on edges, sucks on transparencies.
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
The upshot of this project has been that I'm starting to feel like I have a strong grasp of ReShade FX syntax. Even if there's a freak breakthrough in anti-aliasing mathematical methodology hiding in my brain somewhere (which I highly doubt, but hey, who knows), it wouldn't do anyone any good if I couldn't code it properly due to not understanding exactly what my code is doing.
Please Log in or Create an account to join the conversation.
- Illuzio
Your shader has really good results on this game !
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.
- lordbean
- Topic Author
Please Log in or Create an account to join the conversation.