HBAO+ Compatibility Flags Thread

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by MrBonk, Mar 3, 2014.

  1. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    [​IMG]
    (Thanks to Cyberdyne, for his AA thread layout. Which I shamelessly copied for the sake of consistency)

    The following are HBAO+ Flags to be used with NVidiaInspector
    [​IMG]
    A guide for the setup and basics of Inspector is here.


    What is HBAO+? 1 2
    Information on Original HBAO (Since HBAO+ is an evolution, it shares many of the same traits) 1



    2017: It is no longer possible to directly embed the list. Here's a link to view it instead.
    https://docs.google.com/spreadsheets/d/1sq0vgFlerS-YT093TS2jEpx6xjZP7X1x1BcAs7EHXYY/edit?usp=sharing




    (References listed as "OP" Are ones I tested myself very heavily before making this thread. Or those given from others who's posts it would be too tedious to track down)

    [​IMG]
    The 32/64 versions relate to whether the game is 32/64-bit! This is important! If your DX11 game is 32-bit then you need that .dll. Vice versa!

    Rules for posting a flag to be used in the OP:
    • In order to filter out the discussion from entries needing to be added to the spreadsheet, results need to be presented in some form of proper formatting like the below (Or else I might miss it, or have a hard time parsing through the information needed). It makes things easier for everyone so please play along :). Screenshots with an OSD showing GPU usage, framerate,etc are recommended as well please!

      (Note the below is just a generic template you can use. Feel free to make your own. Just make it easily visible and structured in some way!)

      (when making a post, just delete the "`" from the brackets)
    ________________________________________________________________

    List of Games not recommended to use HBAO+ With, or is currently impossible to do so.
    EDIT AS OF 11/2015 - A new method for modifying HBAO+ to the needs of the game has been discovered and overturns this list almost completely. It is just a matter of revisiting those games and plugging away at trial and error.

    I will remove entries as they are fixed! So take a whack at it!




    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

    - How can I help test and find flags? The easy way.-
    (And determine if it is impossible to force HBAO+)


    It's as simple as loading up or making a profile for a game, and going down the list of available flags in the driver to figure out which ones work and are ideal for that specific game! :) (If any fit that criteria that is)

    Different Flags with bits in different slots are corresponding to which API they work in

    These flags are not combinations of functions like with Anti Aliasing Flags. But rather each flag set corresponds to a set of programmed HBAO+ functions for that flag.
    So it is not wise to test any flags beyond what is in the list in Nvidia Inspector, as these undefined flags are often what seem to be testbed flags for Nvidia and will be modified when a new flag is introduced in a new driver (IE:As of 11/2015 we are up to 0x00000039 for DX9 flags, the next flag will be 0x0000003A). (Though there have been exceptions)

    If your title is a DX8 game and you wish to try> You may follow this post to give it a shot if going down the list of available flags does not produce any results

    Generally, there are a lot of cases where one flag series for one game engine (like Unreal Engine 3) will tend to work with other games on that engine. Though this is not universal, this helps you have some sort of starting point of what flags to start trying.
    So for example here are a list of flags built into the driver by default for games running on UE3
    • 0x00000002
    • 0x00000010
    • 0x00000020
    • 0x00000021
    • 0x00000024
    • 0x00000025
    • 0x00000026
    • 0x0000002F
    • 0x00000030
    Remember this is just a starting point! :)


    Things to look out for when testing various HBAO+ Flags:
    • Sometimes, a flag will work (Or won't), but it will kill your GPU Usage and framerate. I'm sure this has something to do with how HBAO+ is specifically rendered. So it's important that you use an OSD like MSI Afterburner to monitor statistics while you test
    • Does the game already have some form of AO? If so what kind? Can it be disabled? It should probably be disabled to force HBAO+. If it already has some form of AO that can't be disabled, it's probably not a great idea and should be listed for *Impossibility* (EG: Post for the game using the same template as above, but in the "Flag" Field, type it's impossible, or has undefeatable SSAO or can't be done without issues.)
    • There are a large number of things to look out for when testing HBAO+ in order to find the ideal solution for the game in question
      1. Clouding and flickering - Are the AO'd areas too dark/inaccurate and move like a foggy cloud or flicker in motion? Video Example (Look at the Grass and how at certain angles it's applied like a thick ugly cloud). Image Example
      2. Is it applied too strongly? - AO can be applied too strongly to the contrast of the rest of the rendered environment and if there is a angle bias issue as well, the angle of the camera can cause issues with undersampling artifacts that look like and can cause aliasing. Video Example
      3. Does it turn on and off at different angles? - Again, could be an angle bias issue or something. Video Example
      4. How does it behave with Fogging? - (Also applies to volumetric fog) Sometimes AO applied just does not agree with how a game has Fog set up, which can result in a number of things such as it being applied through the fog, and too strongly as well, resulting in an ugly image that just looks discontinuitous . Image Examples: 1 2 3 4
        Sometimes when issues with fog arrive, so some undersampling glitches. Image Examples 1 (Look at the sand in the upper middle right) 2
      5. How does it look once AA is applied? (Does it look natural and flush with the game, or does it adversely increase aliasing issues or other things?)
      6. Are there just general glitches and ugliness? - sometimes HBAO+ Just doesn't play nice with a game at all, or with certain flags. Which can lead to things like the entire graphics becoming glitched, things missing, the entire HBAO+ buffer bleeding through and making everything look very bad. Image Examples 1 2 3 4 5
      7. Does it bleed through things like Overlays, objects or UI? - Not sure the causes, but the AO can sometimes just bleed through just about EVERYTHING, leading to immersion breaking results. Image Examples 1
      8. Are there strange horizontal or vertical lines? Thin and thick? A common enough fix seems to be to use "Performance" mode rather than "Quality" or "High Quality"


    Good Luck and Happy Hunting!
    :banana:

    This ends the "Easy Way" section.
    _______________________________________________
    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    - How can I help test and find flags? The hard hair pulling out way.- (And determine if it is impossible to force HBAO+)

    Thanks to Guzz, the possibilities are much much greater than we could have otherwise.

    He discovered that the HBAO+ flags actually reference a set of programmed values.
    These flags point to a set of paramaters with DX11 and DX9 having their values stored in different system .DLLs.
    *It is extremely important that you understand that you will have to re-modify values and re-copy these .dlls every time you install a new or old driver!*

    *To HEX edit the .dlls to modify values you will need a HEX editor such as HxD with the bytes per column set to 16. This fits DX9 flags neatly in one row. But DX10 flags have overlap either way. When searching for a flag to modify, hit CRTL+F and click the drop down box to change to "Hex values" and copypasta the values of the flag you are modifying from the list here below.

    It is also important to note that you cannot Copypasta modified values with HxD. It will not work. You need to enter the values manually!

    *To make things simpler and less destructive on a per game basis. You need to copy the .dll coresponding to the game API into the game's directory with it's .exe file. The Driver will then use that local version instead of the one in the system directories. *

    -For DX9 There are 16 bytes pertaining to 4 different sets of functions.

    Code:
    00 00 00 00|00 00 00 00|00 00 00 00|00 00 00 00
    1. Insertion Logic
    2. Pattern Match Mask
    3. Parameter Bits
    4. Debug Bits (Which don't do anything)
    Here is a list of the DX9 flags and their values as of driver version 359.06
    0x00000001
    Code:
    4E 91 20 18 00 00 28 18 A5 60 68 0A 00 00 00 00
    0x00000002
    Code:
    A2 90 00 18 00 00 14 18 90 40 BF 0A 00 00 00 00
    0x00000003
    Code:
    5E D0 00 18 00 00 16 18 75 A0 6F 07 00 00 00 00
    0x00000004
    Code:
    26 B2 80 18 00 00 B0 18 A5 60 6E 03 00 00 00 00
    0x00000005
    Code:
    26 B2 80 18 00 00 B0 18 A5 60 6E 03 00 00 00 00
    0x00000006
    Code:
    16 30 00 00 00 00 00 00 A5 A0 6F 05 00 00 00 00
    0x00000007
    Code:
    16 B0 03 18 00 00 02 1C A5 A0 6F 05 00 00 00 00
    0x00000008
    Code:
    16 B0 03 18 00 00 02 1C A5 A0 6F 07 00 00 00 00
    0x00000009
    Code:
    16 30 00 00 00 00 00 00 A5 A0 6F 05 00 00 00 00
    0x0000000A
    Code:
    16 90 01 58 00 00 00 5C A5 A0 6F 07 00 00 00 00
    0x0000000B
    Code:
    16 B0 03 18 00 00 02 1C A5 A0 6F 05 00 00 00 00
    0x0000000C
    Code:
    13 90 00 18 00 00 16 18 A5 A0 6F 05 00 00 00 00
    0x0000000D
    Code:
    53 30 00 00 00 00 00 00 A3 A0 BD 08 00 00 00 00
    0x0000000E
    Code:
    DE 80 80 18 00 00 96 18 95 A0 7F 0B 00 00 00 00
    0x0000000F
    Code:
    DA 90 80 18 00 00 96 18 B5 A0 68 08 00 00 00 00
    0x00000010
    Code:
    AE 98 02 18 00 00 02 1C 83 A0 4F 0A 00 00 00 00
    0x00000011
    Code:
    56 98 00 18 00 00 00 1A 75 A0 BF 05 00 00 00 00
    0x00000012
    Code:
    16 B0 03 18 00 00 02 1C A5 A0 6F 05 00 00 00 00
    0x00000013
    Code:
    AE 38 00 00 00 00 00 00 B3 A0 6F 0A 00 00 00 00
    0x00000014
    Code:
    16 30 00 00 00 00 00 00 A5 20 6F 05 00 00 00 00
    0x00000015
    Code:
    26 B2 80 18 00 00 B0 18 65 30 4F 03 00 00 00 00
    0x00000016
    Code:
    AE 90 02 18 00 00 02 1C B3 A0 6F 05 00 00 00 00
    0x00000017
    Code:
    2E 93 00 18 00 00 14 18 93 90 BF 0A 00 00 00 00
    0x00000018
    Code:
    2E 93 20 18 00 00 20 18 85 90 B8 0B 00 00 00 00
    0x00060019
    Code:
    16 B0 80 18 00 00 82 18 A5 A0 6F 0A 00 00 00 00
    0x0000001A
    Code:
    16 90 80 18 00 00 B0 18 A5 70 BE 05 00 00 00 00
    0x0000001B
    Code:
    2E 93 00 18 00 00 00 1C 85 60 BF 05 00 00 00 00
    0x0000001C
    Code:
    9E 98 00 18 00 00 08 18 75 A0 BA 0A 00 00 00 00
    0x0000001D
    Code:
    16 90 00 18 00 00 36 19 B1 A0 BF 08 00 00 01 00
    0x0000001E
    Code:
    1E 40 00 00 00 00 00 00 95 A0 68 09 00 00 00 00
    0x0000001F
    Code:
    16 30 00 00 00 00 00 00 A5 50 96 0C 00 00 00 00
    0x00000020
    Code:
    EB 93 00 18 00 00 16 18 A3 90 9F 0B 00 00 00 00
    0x00000021
    Code:
    EB 93 00 18 00 00 00 18 A4 80 AF 0B 00 00 00 00
    0x00000022
    Code:
    13 50 00 00 00 00 00 00 84 90 76 0C 00 00 00 00
    0x00000023
    Code:
    22 90 00 18 00 00 02 18 A3 A0 BE 0B 00 00 00 00
    0x00000024
    Code:
    AA 90 02 18 00 00 02 1C A4 A0 BF 0B 00 00 00 00
    0x00000025
    Code:
    EF 93 02 18 00 00 02 18 A5 A0 9E 0B 00 00 00 00
    0x00000026
    Code:
    A6 90 40 18 00 00 40 18 A3 A0 6F 09 00 00 00 00
    0x00000027
    Code:
    DA 80 00 20 00 00 00 28 95 A0 A8 08 01 00 00 00
    0x00000028
    Code:
    22 B2 80 18 00 00 B0 18 95 30 AE 0B 00 00 00 00
    0x00000029
    Code:
    26 B2 80 19 00 00 B0 19 A5 60 4E 05 00 00 00 00
    0x0000002A
    Code:
    16 B0 03 18 00 00 02 1C A5 40 6E 09 00 00 00 00
    0x0000002B
    Code:
    5E 83 00 18 00 00 00 1C 23 80 7D 0B 02 00 00 00
    0x0000002C
    Code:
    16 B0 03 18 00 00 02 1C 85 A0 6F 05 00 00 00 00
    0x0000002D
    Code:
    2E 93 00 18 00 00 16 18 A3 90 78 0B 00 00 00 00
    0x0000002E
    Code:
    16 20 80 18 00 00 80 18 83 A0 2F 05 04 00 00 01
    0x0000002F
    Code:
    AA 98 80 18 00 00 B4 18 A3 A0 6F 05 00 00 00 00
    0x00000030
    Code:
    AE A8 00 18 00 00 00 1C A4 A0 7F 0B 00 00 00 00
    0x00000031
    Code:
    2E 93 00 18 00 00 00 18 85 60 B8 09 00 00 00 00
    0x00000032
    Code:
    16 A0 C8 04 00 00 FA 05 75 60 A8 01 03 00 00 00
    0x00000033
    Code:
    12 80 03 10 00 00 20 10 A5 50 96 2F 00 00 02 00
    0x00000034
    Code:
    AE 80 02 10 00 00 06 10 83 90 78 09 00 00 00 00
    0x00120035
    Code:
    1E 80 80 18 00 00 B0 18 43 10 41 07 00 00 00 00
    0x00000036
    Code:
    DA 80 00 20 00 00 00 28 95 A0 A8 08 01 00 00 00
    0x00000037
    Code:
    26 82 80 00 00 00 80 00 73 30 6D 03 00 00 00 00
    0x00000038
    Code:
    26 B2 80 18 00 00 B0 18 65 10 7E 05 00 00 00 00
    0x00000039
    Code:
    1E 80 10 19 00 00 B0 1B 85 60 48 07 00 00 00 00
    -For DX10+ There are only 12 bytes pertaining to 3 different sets of functions. To an extent DX10 could be considered easier since you don't also have a pattern match mask.
    Code:
    00 00 00 00|00 00 00 00|00 00 00 00
    1. Insertion Logic
    2. Parameter Bits
    3. Debug Bits (Which don't do anything)
    Here is a list of the DX10+ flags and their values as of driver version 359.06
    0x00010000
    Code:
    F1 31 00 88 C1 60 7E 0E 00 00 00 00
    0x00020000
    Code:
    F6 35 00 89 65 60 7F 0C 00 00 00 00
    0x00030000
    Code:
    77 01 00 89 35 60 BF 01 00 00 00 00
    0x00040000
    Code:
    76 01 80 88 35 60 6F 05 00 00 00 00
    0x00050000
    Code:
    76 01 80 88 35 60 6F 05 00 00 00 00
    0x00060000
    Code:
    F6 30 80 89 83 70 8C 0E 00 00 00 00
    0x00070000
    Code:
    7E 01 00 88 82 50 87 0A 00 00 00 00
    0x00080000
    Code:
    70 01 80 89 35 60 BF 00 00 00 00 00
    0x00090000
    Code:
    FE 31 80 89 73 80 8C 0C 00 00 00 00
    0x000A0000
    Code:
    77 01 80 81 35 60 BF 05 00 00 00 00
    0x000B0000
    Code:
    72 01 00 88 45 60 9F 05 00 00 00 00
    0x000C0000
    Code:
    FA 31 80 89 85 60 8C 0A 00 00 00 00
    0x000D0000
    Code:
    F6 35 00 88 75 60 6D 04 00 00 00 00
    0x000E0000
    Code:
    FE 31 80 89 63 80 8C 0C 00 00 00 00
    0x000F0000
    Code:
    76 58 00 82 73 40 5D 07 01 00 00 00
    0x00100000
    Code:
    00 B3 03 82 45 60 9F 05 00 00 00 00
    0x00110000
    Code:
    20 00 80 81 73 40 5D 07 00 00 00 00
    0x00120035
    Code:
    76 01 00 81 43 10 41 07 00 00 00 00
    0x00130000
    Code:
    76 10 00 82 73 40 5D 0E 00 00 00 00
    0x00140000
    Code:
    26 01 00 81 63 50 86 0A 00 00 00 00
    0x00150000
    Code:
    00 10 02 82 22 60 FF 0F 00 00 00 00
    0x00160000
    Code:
    76 10 00 82 77 30 53 0E 02 00 00 00
    0x00170000
    Code:
    06 10 00 82 65 30 7D 0B 00 00 00 00
    0x00180000
    Code:
    08 00 00 99 A3 70 97 0A 00 00 00 00
    The Parameter Bits for each are the same for all 3 APIs. DX9/10/11
    While the Insertion Logic is different for all 3 APIs. DX9/10/11 With an exception though. DX10 and 11 share Insertion Logic bits, but I only have information on about half of them. They primarily only match up to the functions that were there before DX11.
    And Pattern Match Masks are exclusive to DX9.



    Insertion Logic values DX9

    Byte-1
    01 00 00 00 -Application has Z-Prepass
    02 00 00 00 -Check if Viewport Width matches Primary flip
    03 00 00 00 -Z-Pre+View Width
    04 00 00 00 -Check if Viewport Height matches Primary Flip
    05 00 00 00 -Z-Pre+View Height
    06 00 00 00 -View Width+View Height
    07 00 00 00 -Z-Pre+View Width+View Height
    08 00 00 00 -Ignore Draw Calls with two or less Primitives
    09 00 00 00 -Z-Pre+Ignore DC
    0A 00 00 00 -View Width+Ignore DC
    0B 00 00 00 -Z-Pre+View Width+Ignore DC
    0C 00 00 00 -View Height+Ignore DC
    0D 00 00 00 -Z-Pre+View Height+Ignore DC
    0E 00 00 00 -View Height+View Width+Ignore DC
    0F 00 00 00 -Z-Pre+View Width+View Height +Ignore DC
    10 00 00 00 -View Projection 1
    20 00 00 00 -View Projection 2
    30 00 00 00 -View Projection Types - Auto calibrate from a WorldViewProjection type
    40 00 00 00 -View Projection Check Aspect Ratio
    50 00 00 00 -VP1+CheckAR
    60 00 00 00 -VP2+CheckAR
    70 00 00 00 -VPTypes+VP1+VP2+CheckAR
    80 00 00 00 -View Projection Transpose
    90 00 00 00 -VP1+Transpose
    A0 00 00 00 -VP2+Transpose
    B0 00 00 00 -VPTypes+VP1+VP2+Transpose
    C0 00 00 00 -CheckAR+Transpose
    D0 00 00 00 -VP1+CheckAR+Transpose
    E0 00 00 00 -VP2+CheckAR+Transpose
    F0 00 00 00 -VPTypes+VP1+VP2+CheckAR+Transpose
    Byte-2
    00 01 00 00 -Auto Calibrate only if MinZ=0
    00 02 00 00 -Auto Calibrate only if MaxZ=1
    00 03 00 00 -AC MinZ+AC MaxZ
    00 04 00 00 -Color Format is restricted to A2R10G10B10
    00 05 00 00 -AC MinZ+ColorF restricted
    00 06 00 00 -AC MaxZ+ColorF restricted
    00 07 00 00 -AC MinZ+AC MaxZ+ColorF restricted
    00 08 00 00 -Compute Linear Z before Z-Clear
    00 09 00 00 -AC MinZ+Linear Z before Z-Clear
    00 0A 00 00 -AC MaxZ+Linear Z before Z-Clear
    00 0B 00 00 -AC MinZ+AC MinZ+Linear Z before Z-Clear
    00 0C 00 00 -ColorF restricted+Linear Z before Z-Clear
    00 0D 00 00 -AC MinZ+ColorF restricted+Linear Z before Z-Clear
    00 0E 00 00 -AC MaxZ+ColorF restricted+Linear Z before Z-Clear
    00 0F 00 00 -AC MinZ+AC MaxZ+ColorF restricted+Linear Z before Z-Clear
    00 10 00 00 -Insert AO at Present
    00 20 00 00 -Insert AO before Stretch Rectangle
    00 30 00 00 -Insert Present+Before Stretch Rectangle
    00 40 00 00 -Insert AO before Z-Clear
    00 50 00 00 -Insert Present+ Pre Z-Clear
    00 60 00 00 -Insert Before Stretch Rectangle+ Pre Z-Clear
    00 70 00 00 -Insert Present+Before Stretch Rectangle+ Pre Z-Clear
    00 80 00 00 -Insert AO Match States on Draw
    00 90 00 00 -Insert Present+Match States on Draw
    00 A0 00 00 -Insert Before Stretch Rectangle+Match States on Draw
    00 B0 00 00 -Insert at Present + Before Stretch Rectangle+Match States on Draw
    00 C0 00 00 -Insert before Z-Clear+Match States on Draw
    00 D0 00 00 -Insert at Present+Pre Z-Clear+Match States on Draw
    00 E0 00 00 -Insert before Stretch Rectangle+Pre Z-Clear+Match States on Draw
    00 F0 00 00 -Insert at Present+before Stretch Rectangle+Pre Z-Clear+Match States on Draw
    Byte-3
    00 00 01 00 -Insert AO Match States after Z-Clear
    00 00 02 00 -Pattern Cull Enabled
    00 00 03 00 -Match States Post Z-Clear+Pattern Cull
    00 00 04 00 -Pattern Depth Function Equal
    00 00 05 00 -Match States Post Z-Clear+Pattern Depth Func Equal
    00 00 06 00 -Pattern Cull+Pattern Depth Func Equal
    00 00 07 00 -Match States Post Z-Clear+Pattern Cull+Pattern Depth Func Equal
    00 00 08 00 -Pattern Depth Function Less Equal
    00 00 09 00 -Match States Post Z-Clear + Pattern Depth Func Less Equal
    00 00 0A 00 -Pattern Cull + Pattern Depth Func Less Equal
    00 00 0B 00 -Match States Post Z-Clear + Pattern Cull+Pattern Depth Func Less Equal
    00 00 0C 00 -Pattern Depth Func Equal+Pattern Depth Func Less Equal
    00 00 0D 00 -Match States Post Z-Clear+Pattern Depth Func Equal+Pattern Depth Func Less Equal
    00 00 0E 00 -Pattern Cull+Pattern Depth Func Equal+Pattern Depth Func Less Equal
    00 00 0F 00 -Match States Post Z-Clear+Pattern Cull+Pattern Depth Func Equal+Pattern Depth Func Less Equal
    00 00 10 00 -Pattern Stencil enabled
    00 00 20 00 -Pattern Alpha_Test enabled
    00 00 30 00 -Pattern Stencil+Pattern Alpha_Test
    00 00 40 00 -Pattern Alpha_Blend enabled
    00 00 50 00 -Pattern Stencil+Pattern Alpha_Blend
    00 00 60 00 -Pattern Alpha_Test+Pattern Alpha_Blend
    00 00 70 00 -Pattern Stencil+Pattern Alpha_Test+Pattern Alpha_Blend
    00 00 80 00 -Pattern Srcblend_SrcAlpha
    00 00 90 00 -Pattern Stencil+Pattern Srcblend_SrcAlpha
    00 00 A0 00 -Pattern Alpha_Test+Pattern Srcblend_SrcAlpha
    00 00 B0 00 -Pattern Stencil+Pattern Alpha_Test+Pattern Srcblend_SrcAlpha
    00 00 C0 00 -Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    00 00 D0 00 -Pattern Stencil+Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    00 00 E0 00 -Pattern Alpha_Test+Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    00 00 F0 00 -Pattern Stencil+Pattern Alpha_Test+Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    Byte-4
    00 00 00 01 -Pattern DstBlend_One
    00 00 00 02 -Pattern MRT enable
    00 00 00 03 -Pattern DstBlend_One+Pattern MRT
    00 00 00 04 -Pattern Depth_Test enable
    00 00 00 05 -Pattern DstBlend_One+Pattern Depth_Test
    00 00 00 06 -Pattern MRT+Pattern Depth_Test
    00 00 00 07 -Pattern DstBlend_One+Pattern MRT+Pattern Depth_Test
    00 00 00 08 -Pattern ColorWrite enabled
    00 00 00 09 -Pattern DstBlend_One+Pattern ColorWrite
    00 00 00 0A -Pattern MRT+Pattern ColorWrite
    00 00 00 0B -Pattern DstBlend_One+Pattern MRT+Pattern ColorWrite
    00 00 00 0C -Pattern Depth_Test+Pattern ColorWrite
    00 00 00 0D -Pattern DstBlend_One+Pattern Depth_Test+Pattern ColorWrite
    00 00 00 0E -Pattern MRT+Pattern Depth_Test+Pattern ColorWrite
    00 00 00 0F -Pattern DstBlend_One+Pattern MRT+Pattern Depth_Test+Pattern ColorWrite
    00 00 00 10 -Pattern ColorFormat
    00 00 00 20 -Pattern ColorWrite3
    00 00 00 30 -Pattern ColorFormat+Pattern ColorWrite3
    The 4th byte ends here at 3F

    Pattern Match Mask values DX9
    As you will notice these generally need to match at least some of the Pattern match values set in the insertion logic for things to work right.
    Also: The Pattern Match Mask values are EXACTLY the same as the 3rd and 4th Bytes of the Insertion Logic bits minus the insertion functions. Only the 3rd and 4th bytes are used!
    Byte-3
    00 00 02 00 -Pattern Cull Enabled
    00 00 04 00 -Pattern Depth Function Equal
    00 00 06 00 -Pattern Cull+Pattern Depth Func Equal
    00 00 08 00 -Pattern Depth Function Less Equal
    00 00 0A 00 -Pattern Cull + Pattern Depth Func Less Equal
    00 00 0C 00 -Pattern Depth Func Equal+Pattern Depth Func Less Equal
    00 00 0E 00 -Pattern Cull+Pattern Depth Func Equal+Pattern Depth Func Less Equal
    00 00 10 00 -Pattern Stencil enabled
    00 00 20 00 -Pattern Alpha_Test enabled
    00 00 30 00 -Pattern Stencil+Pattern Alpha_Test
    00 00 40 00 -Pattern Alpha_Blend enabled
    00 00 50 00 -Pattern Stencil+Pattern Alpha_Blend
    00 00 60 00 -Pattern Alpha_Test+Pattern Alpha_Blend
    00 00 70 00 -Pattern Stencil+Pattern Alpha_Test+Pattern Alpha_Blend
    00 00 80 00 -Pattern Srcblend_SrcAlpha
    00 00 90 00 -Pattern Stencil+Pattern Srcblend_SrcAlpha
    00 00 A0 00 -Pattern Alpha_Test+Pattern Srcblend_SrcAlpha
    00 00 B0 00 -Pattern Stencil+Pattern Alpha_Test+Pattern Srcblend_SrcAlpha
    00 00 C0 00 -Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    00 00 D0 00 -Pattern Stencil+Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    00 00 E0 00 -Pattern Alpha_Test+Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    00 00 F0 00 -Pattern Stencil+Pattern Alpha_Test+Pattern Alpha_Blend+Pattern Srcblend_SrcAlpha
    Byte-4
    00 00 00 01 -Pattern DstBlend_One
    00 00 00 02 -Pattern MRT enable
    00 00 00 03 -Pattern DstBlend_One+Pattern MRT
    00 00 00 04 -Pattern Depth_Test enable
    00 00 00 05 -Pattern DstBlend_One+Pattern Depth_Test
    00 00 00 06 -Pattern MRT+Pattern Depth_Test
    00 00 00 07 -Pattern DstBlend_One+Pattern MRT+Pattern Depth_Test
    00 00 00 08 -Pattern ColorWrite enabled
    00 00 00 09 -Pattern DstBlend_One+Pattern ColorWrite
    00 00 00 0A -Pattern MRT+Pattern ColorWrite
    00 00 00 0B -Pattern DstBlend_One+Pattern MRT+Pattern ColorWrite
    00 00 00 0C -Pattern Depth_Test+Pattern ColorWrite
    00 00 00 0D -Pattern DstBlend_One+Pattern Depth_Test+Pattern ColorWrite
    00 00 00 0E -Pattern MRT+Pattern Depth_Test+Pattern ColorWrite
    00 00 00 0F -Pattern DstBlend_One+Pattern MRT+Pattern Depth_Test+Pattern ColorWrite
    00 00 00 10 -Pattern ColorFormat
    00 00 00 20 -Pattern ColorWrite3
    00 00 00 30 -Pattern ColorFormat+Pattern ColorWrite3
    The 4th byte ends here at 3F

    Insertion Logic values DX10/DX11
    These only apply when modifying a game that is DX10 or DX11. Don't forget that i'm missing about half of these that pertain to values added for DX11
    Byte-1
    01 00 00 00 -App has Z-Prepass
    02 00 00 00 -Check if Viewport width matches primary
    03 00 00 00 -Z-Prepass+VP Width
    04 00 00 00 -Check if Viewport height matches primary
    05 00 00 00 -Z-Prepass+VP Height
    06 00 00 00 -VP Width+VP Height
    07 00 00 00 -Z-Prepass+VP Width + VP Height
    08 00 00 00 -Render AO if number of Render Targets is one
    09 00 00 00 -Z-Prepass+AO if RT=one
    0A 00 00 00 -VP Width+AO if RT=one
    0B 00 00 00 -Z-Prepass+VP Width+AO if RT=one
    0C 00 00 00 -VP Height+AO if RT=one
    0D 00 00 00 -Z-Prepass+VP Height+AO if RT=one
    0E 00 00 00 -VP Width+VP Height+AO if RT=one
    0F 00 00 00 -Z-Prepass+VP Width+VP Height+AO if RT=one
    10 00 00 00 -Render AO if Stencil is Disabled
    20 00 00 00 -Render AO if Cull is disabled; This one is confusing because the function says "Disabled" but the description says "Render AO necessarily if Cull is enabled"
    30 00 00 00 -Stencil+Cull
    40 00 00 00 -Render AO if DepthFunc is Not Comparson Equal
    50 00 00 00 -Stencil+DepthFunc NCE
    60 00 00 00 -Cull+DepthFunc NCE
    70 00 00 00 -Stencil+Cull+DepthFunc NCE
    80 00 00 00 -Render AO when Render Target is used as Shader Resource View (SRV)
    90 00 00 00 -Stencil+AO RT SRV
    A0 00 00 00 -Cull+AO RT SRV
    B0 00 00 00 -Stencil+Cull+AO RT SRV
    C0 00 00 00 -DepthFunc NCE+AO RT SRV
    D0 00 00 00 -Stencil+DepthFunc NCE+AO RT SRV
    E0 00 00 00 -Cull+DepthFunc NCE+AO RT SRV
    F0 00 00 00 -Stencil+Cull+DepthFunc NCE+AO RT SRV
    Byte-2
    00 01 00 00 -Ignore Draw Calls with Four or less Verticies
    00 02 00 00 -Ignore Alpha_Blend Modes
    00 03 00 00 -Ignore<4 Verticies+Ignore Alpha_Blend
    00 04 00 00 -Render AO when DS is cleared DS= Depth Surface i'm assuming
    00 05 00 00 -Ignore<4 Verticies+AO when DS-Clear
    00 06 00 00 -Ignore Alpha_Blend+AO when DS-Clear
    00 07 00 00 -Ignore<4 Verticies+Ignore Alpha_Blend+AO when DS-Clear
    00 10 00 00 -Use DS with most Opaque Draws ; Descript is, "Build Linear-Z from the DS that has the largest number of Draw Calls in the SHADING_OPAQUE state"
    00 20 00 00 -Use RT with most Opaque Draws; Descript is, "Apply AO to the RT with the largest number of Draw Calls in the SHADING_OPAQUE state"
    00 30 00 00 -DS Opaque+RT Opaque
    Byte-3
    00 00 80 00 -Autocalibrate from default dynamic CBS
    Byte-4
    00 00 00 07 -View Projection Types - Auto calibrate from a WorldViewProjection type
    00 00 00 08 -View Projection Check Aspect Ratio
    00 00 00 0F -VPTypes+VP CheckAR
    00 00 00 80 -Use CPAO Shim, Creates AO Shim device "AO is completely disabled if this bit is 0"

    Parameter Bits DX9/10/11

    00 00 00 00
    Strength
    00 00 00 00
    Use FP16 Linear-Z (0 = R32F, 1=R16F, so on)
    00 00 00 00
    AO Fog Amount (Values used in Official.Flags: 1,6,8,A,D,E,F)
    00 00 00 00
    Blur Sharpness
    00 00 00 00
    Unused(?)
    00 00 00 00
    AO Fog Fade off factor (Distance to Half strength)
    00 00 00 00
    Angle Bias
    00 00 00 00
    Multiplier

    A lot of these values play off of each other so there is no concrete explanation that I can offer you as of yet on how much they do. You just have to experiment!
    ________________________________________________

    If you speak German, there is our companion thread at Extreme PCGames Hardware

    http://extreme.pcgameshardware.de/grafikkarten/328894-sammelthread-hbao-kompatibilitaetsbits.html

    Hopefully we can all end up helping each other out and compiling the best list we can.
     
    Last edited: May 8, 2017
    Markie, BlindBison and Jonelo like this.
  2. -Tj-

    -Tj- Ancient Guru

    Messages:
    18,097
    Likes Received:
    2,603
    GPU:
    3080TI iChill Black
    I have this AO flags list, someone @ guru3d posted it once

    Game engine and AO flag

    AtmosFear 4: 0x00080000
    Call of Duty Engine: 0x00000004 , 0x00000005 , 0x00000015 , 0x00000028
    Chrome Engine: 0x00060000 , 0x00060019
    CryEngine: 0x00000018
    Demigod: 0x0000001F
    Dunia: 0x00010000 , 0x000A0000
    EGO: 0x0000000E
    Eclipse: 0x0000001C
    Essence Engine: 0x00070000
    Fable: 0x00000023
    Frostbite: 0x00000002
    Gamebryo: 0x00000003 , 0x00000011 , 0x00000029
    Godfather: 0x0000000F
    IRISZOOM engine: 0x0000001D
    Id Tech: 0x00000017
    Lithtech: Jupiter EX: 0x0000000D
    Lost Planet: 0x00040000 , 0x00050000
    Lycium: 0x00000000
    MT Framework: 0x00090000 , 0x000C0000
    Madness Engine: 0x0000001E
    MassTech Game Engine: 0x000B0000
    Pleione Engine: 0x00000012
    Real Virtuality: 0x00000013 , 0x00000016
    Scimitar: 0x00000022
    Source Engine: 0x00000006 , 0x00000007 , 0x00000008 , 0x00000009 , 0x00000014 , 0x0000000A
    StarCraft II: 0x00000027
    Street Fighter: 0x0000001A
    Unreal Engine: 0x00000010 , 0x00000020 , 0x00000021 , 0x00000024 , 0x00000025 , 0x00000026 , 0x00020000
    WoW: 0x000D0001

    Its a little old though..
     
  3. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Old SSAO flags are unfortunately not compatible as far as my testing has showed.

    And there isn't really anything engine specific, stuff just needs to be done on a per game basis.


    Which makes things difficult, a lot more so than AA flags.
     
  4. Dr4Wm4N

    Dr4Wm4N Member Guru

    Messages:
    114
    Likes Received:
    19
    GPU:
    NVidia RTX 3090
    Here's a little test report on one of your profiles:

    - Castlevania Lords of Shadow 2 -
    Flag:
    0x00000030
    General Information that is relevant and necessary for the game:
    Tested with retail version, is applied through fog and sometimes toggles quickly on and off at different angles.
    The issues with fog are particularly visible in the cinematic that plays when the last boss appears.
     

  5. -Tj-

    -Tj- Ancient Guru

    Messages:
    18,097
    Likes Received:
    2,603
    GPU:
    3080TI iChill Black
    Stalker Shadow of Chernobyl - 0x00000029 (Elder Scrolls V: Skyrim)

    Almost no fogging, the only "bad" thing is it can make trees a bit darker then usual.
     
  6. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    :) Thank you!

    Now, is it possible for you to test and find another flag at all? :pc1:
     
  7. applejack

    applejack Master Guru

    Messages:
    586
    Likes Received:
    8
    GPU:
    MSI 3070 Ventus 3X
    I was wondering why you ignored the AO category in the spreadsheet linked at the "NVidia Anti-Aliasing Guide (updated)" sticky thread (you did add some AA entries to that list).
    are you saying most known HBAO flags aren't working at all, or just not producing the better HBAO+ type of effect ?
    what about older officially supported games, are they all doing HBAO+ now ? (if so, have their flags change for that ?)

    also, many thanks for your hard work, much appreciated !
     
    Last edited: Mar 4, 2014
  8. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    The truth of the matter is that the old SSAO flags (Now HBAO+) don't even work with a lot of the games they were put in the driver for.

    SSAO and HBAO+ Are rendered fundamentally different. So the parameters are somewhat different. Which means what worked for SSAO doesn't work always for HBAO+ unfortunately.
    (Not to say that it's impossible! Look at Torchlight 1, the 0x00000003 flag I found for SSAO ended up working fairly well for HBAO+, but I ended up much preferring 0x00000011 instead, but they both work)


    However, with some references to links from others on 3DCenter I have added some entries where a known SSAO flag was working but needed testing.


    AS WELL, old SSAO flags may be a good starting point for testing HBAO+. Fundamentally, all the old SSAO flags need to be tested for issues and compared to other flags if they aren't ideal anymore.


    So please feel free to use those flags as a starting point for those games and test to see if they work without issue without HBAO+! :)

    I'd love if most of them were fine, but again, needs to be verified :D
     
  9. Canzah

    Canzah Guest

    Messages:
    131
    Likes Received:
    0
    GPU:
    Gigabyte GTX 780 Ti GHz
    Risen and Risen 2 flags?
     
  10. applejack

    applejack Master Guru

    Messages:
    586
    Likes Received:
    8
    GPU:
    MSI 3070 Ventus 3X
    @MrBonk, why you keep referring to the previous version of HBAO as "SSAO" ?
    both HBAO and HBAO+ are improved forms of SSAO in some way.
    at least this is how Nvidia marketed it from start.

    anyway, I heard (maybe even in Nvidia's post) that enabling HBAO+ method requires setting up the NVCP Ambient Occlusion feature to "Quality" mode. (not sure about "High Quality" in nvinspector though).
    perhaps you know, does it means "Performance" mode still produce regular HBAO ?
    because if so, it could mean all previous flags might work fine in "Performance" mode (maybe even at "High Quality" in nvinspector, unless HBAO+ took over it).

    haven't tested AO flags for a while now. just trying to catch up.
     
    Last edited: Mar 4, 2014

  11. Canzah

    Canzah Guest

    Messages:
    131
    Likes Received:
    0
    GPU:
    Gigabyte GTX 780 Ti GHz
    All 3 variants are HBAO+ as far as I'm aware, just more and less precise versions.
    Nvidia completely replaced regular SSAO support in drivers with HBAO+, hence why old flags don't work.
     
  12. Cyberdyne

    Cyberdyne Guest

    Messages:
    3,580
    Likes Received:
    308
    GPU:
    2080 Ti FTW3 Ultra
    Awesome. PM Hilbert or another mod if you want it stickied.
     
  13. Anarion

    Anarion Ancient Guru

    Messages:
    13,599
    Likes Received:
    386
    GPU:
    GeForce RTX 3060 Ti
    There has never been driver HBAO. They recently switched to HBAO+.
     
  14. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Yes this is true.

    I've seen Performance make a difference, but no HQ in titles i've tested myself.


    As well, SSAO (In the way that we know it, IE:SSAO in Crysis) is still quite different than HBAO. (Which is still screen space based)

    They are rooted in same base ideas, but the algorithms and implementation are different.
     
    Last edited: Mar 4, 2014
  15. applejack

    applejack Master Guru

    Messages:
    586
    Likes Received:
    8
    GPU:
    MSI 3070 Ventus 3X
    this surprises me to be honest. I actually cannot find a reference of Nvidia specifically using (older) HBAO in driver, but in most places where SSAO is mentioned in regards to driver implementation, the Siggraph 2008 HBAO document was linked.

    driver AO came only after the the introduction of that HBAO research by nvidia.
    I was messing with driver AO a LOT at the time, and it did look very similar to some in-game HBAO implementations. at the same time, it always looked different and BETTER than any SSAO implementation I've stumbled upon in games.
    (even looked better than Farcry 3's build-in HBAO which felt somewhat fake. shame driver AO was unusable due to flicker in that case).
     
    Last edited: Mar 4, 2014

  16. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    I dunno, I think it was SSAO(Actually i'm almost certain, since within DRST there are fields for HBAO+ and SSAO), I remember only having nothing but problems with it. Too many issues, cost too much performance (Compared to HBAO+ now which has great performance in comparison)
    I dun know any mods , guess it's time to do a user search!

    AOPARAMETERBITS :
    This key is of type DWORD
    The key is a collection of Bitfields.
    You may assign it to some combination of the names listed below
    but that is not required. You may also enter a dword value directly.

    SSAO (Screen Space Ambient Occlusion) paramaters
     
  17. -Tj-

    -Tj- Ancient Guru

    Messages:
    18,097
    Likes Received:
    2,603
    GPU:
    3080TI iChill Black
    They used SSAO from beginning up to r331 branch..

    Somewhere ~ r270 they tweaked it a bit (split to perf. and quality), but imo it went worse from there on.. More bugs then not.
     
  18. Canzah

    Canzah Guest

    Messages:
    131
    Likes Received:
    0
    GPU:
    Gigabyte GTX 780 Ti GHz
    Again, it used to be only SSAO, no HBAO ever before in drivers (not counting the current HBAO+ to which Nvidia switched starting 330-something (may have been 331 as -Tj- above me mentioned).
    And just like the current HBAO+, the performance/quality things determine accuracy/resolution of the effect. It worked the same with SSAO. The reason it looked better than most game's built-in SSAO is because games often went for low res and inaccurate SSAO implementations. Take Sleeping Dogs for example, it probably has the worst SSAO implementation I've ever seen. It looks like black fluid rather than proper shading.
     
  19. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Sure, but i've yet to actually see a visual or even performance difference from using HQ. I'd love to see some!.


    Also: Bad AO? Have you played Bionic Commando 2009 or Warhammer 40k space marine? :D
     
  20. Whiplashwang

    Whiplashwang Ancient Guru

    Messages:
    2,459
    Likes Received:
    396
    GPU:
    RTX 4090 PNY
    Does anyone have Assassin's Creed II installed? I remember using Fable the Lost Chapters AO flag and it worked, but since the update to HBAO+ it may not anymore.
     

Share This Page