HBAO+ Compatibility Flags Thread

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

  1. tapioks

    tapioks Guest

    Messages:
    79
    Likes Received:
    2
    GPU:
    GTX 780M 4GB
    It's the Steam version of Black Mesa.
     
  2. kx11

    kx11 Ancient Guru

    Messages:
    4,867
    Likes Received:
    2,678
    GPU:
    RTX 4090
    man that's bad news :(
     
  3. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    :3eyes:
    That's very interesting!

    I feel like this might be worth experimenting with now more. I might have to try ToZ with this...
     
  4. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    OK, so bell ringing moment.

    With the flags, Guzz mentions that each is grouped into four pairings. Each is a 8 digit DWORD. With each being corresponding to different categories.

    Thing is, I know I think what the combinations are for each set of pairings.

    And copying the .DLL to the game directory DOES let the game run off of that copy (Which is awesome).

    So I experimented with Tales of Zestiria by only playing with the first DWORD which is HBAO+ Insertion Logic Bits.

    Using the flag 2F
    I changed 0x2A988018 to 0x2A948018
    98 corresponding to "PATTERN_DEPTHFUNC_LESSEQUAL"
    94 corresponding to "PATTERN_DEPTHFUNC_EQUAL"
    With 94 suddenly AO is turning on and off if I rotate the camera horizontally beyond a certain point. With 98, this doesn't happen.
    (EDIT, turns out this is WRONG but the change still does as explained)


    This works with the first Function.

    But the second, PatternMatchMask seems to be a bit of a bust. To my documentation the values dont' match up.
    If I change 0000B418 to all 0s then AO isn't working at all. Hmm
    (EDIT: Turns out these values are reversed and DO match up to my docs > http://forums.guru3d.com/showpost.php?p=5182656&postcount=1884)

    The Debug values seem to match up though they do not function. Probably because this is for dev/debug enabled drivers only maybe?


    For the parameter bits (EDITED for correctness because the values are reversed)
    00 00 00 00
    Strength
    00 00 00 00
    Use FP16 Linear-Z (0 = R32F, 1=R16F)
    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



    Here is a test using the blur sharpness bit.
    Value of 6 http://abload.de/img/talesofzestiria_2015_aouss.png
    Value of 1 http://abload.de/img/talesofzestiria_2015_v5uhj.png
    Here's another test changing the Linear-Z format
    Linear-Z=1 http://u.cubeupload.com/MrBonk/c9TalesofZestiria20151.png
    Linear-Z=0 http://u.cubeupload.com/MrBonk/621TalesofZestiria20151.png
    It gets stranger though values greater than 1 produce results like
    http://u.cubeupload.com/MrBonk/2dbTalesofZestiria20151.png (Value of 2)
    http://u.cubeupload.com/MrBonk/c97TalesofZestiria20151.png(Value of F;F=the number 16)

    And it's worth noting that no Official HBAO+ Flag uses a value greater than 2(Most use a value of 0, and only 1 uses a value of 2 IIRC, which is flag 0x00000033;Dark Souls II?;), so these must be progressively lower and lower precision values.

    I'm almost able to make it useable. But i'm out of time for tonight. I'll try again after work tomorrow.
     
    Last edited: Nov 4, 2015

  5. What are you guys using to edit the local .dll nv3dum file? I was curious so, I unzipped a copy (archive) of the file then tried reading the .text file in the NP++ Hex Editor, but could not find the values listed in the Hex Table. Guzz, Mr. Bonk, pedigrew, or any other Guru who successful edited the file, point me to the program I should be using, thanks!
     
    Last edited by a moderator: Oct 30, 2015
  6. robgrab

    robgrab Guest

    Messages:
    101
    Likes Received:
    0
    GPU:
    ASUS Strix 1080 8GB
    I picked up Disney Infinity 3.0 yesterday and it has obnoxious SSAO. I assume it's a DX9 game. I have no idea what game engine they're using. Any ideas where start?
     
  7. pedigrew

    pedigrew Master Guru

    Messages:
    215
    Likes Received:
    3
    GPU:
    MSI 980TI Lightning
    I use this
     
  8. According to official system requirements, Disney Infinity 3.0 is a DX11 only game. I recommend trying all the DX11 predefined flags first then, experiment by adding 1 to the previous flag, click apply, and keep testing until you get HBAO+ with not a large performance cost (10% - 20% max). Without more documentation finding the HBAO+ bits of custom engines will be trial and error.

    Thanks pedigrew, I'll give the program a go! It seems more functional than the bare bones plugin in NP++.
     
    Last edited by a moderator: Oct 31, 2015
  9. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    I use HxD for Hexediting.

    Also: I've seen Disney Infinity on PS4. Definitely not amazing SSAO.
     
  10. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    More ToZ testing will have to wait until Late sunday night or monday.
     

  11. KoKlusz

    KoKlusz Member Guru

    Messages:
    151
    Likes Received:
    40
    GPU:
    RTX 3080 12 GB
    Deus Ex Human Revolution - Director's Cut

    0x0000002F (modified)

    So, I've managed to fix the bleeding with 2F in DXHRDC with tweaks in nvd3dum.dll. Note that I can't test DX11 mode, so someone is gonna have to do it for me. Tested only on Director's Cut, but I think it should work in vanilla game too. Tested on prologue and first mission, didn't found any problems.

    No AO

    0x0000002F vanilla (AA 98 80 18 00 00 B4 18 A3 A0 6F 05 00 00 00 00) - For whatever reason I couldn't capture effect on screenshot with either Afterburner or Steam, so you have to believe me when I say it's bleeding badly.

    0x0000002F fixed (AA 98 80 18 00 00 20 18 A3 A0 6F 05 00 00 00 00) - While there's nothing particularly wrong with how flag works now, it's suffers from halo effect and some banding.

    0x0000002F modified (AA 98 80 18 00 00 20 18 85 A0 6F 05 00 00 00 00) - I've fixed issues mentioned above by using AO parameters for 2C.
     
    Last edited: Nov 5, 2015
  12. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Nice. I will have to come up with some sort of working guide/reference post for modifying the flags for people when these are in the list.

    Now if only HR could be modded so the UI doesn't become unbearably small at high resolutions.
     
  13. KoKlusz

    KoKlusz Member Guru

    Messages:
    151
    Likes Received:
    40
    GPU:
    RTX 3080 12 GB
    Do you have any idea which value should be changed to fix flickering?
     
  14. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Are you getting flickering in HR now with your new flag?

    Anywho, it's most likely the insertion logic bits that are the problem.
    These on their own can drastically change things.

    If you ARE having problems with your new modified flag here, try changing the value I bolded below.

    AA 94 80 18 00 00 20 18 85 A0 6F 05 00 00 00 00
    Also try a 0 in that slot too.
     
  15. KoKlusz

    KoKlusz Member Guru

    Messages:
    151
    Likes Received:
    40
    GPU:
    RTX 3080 12 GB
    No, Deus Ex work fine, but i wanted do give RE4 a spin, IIRC 0E and 0F where only working, but flickered, I'm trying to figure out best place to start.
     

  16. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Yeah for that, I would definitely maybe just start out by swapping all 16 bytes of the Insertion logic bits from other flags and see what happens.
     
  17. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    Or play with the parameters and see if they make any difference on the off chance.
     
  18. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    I almost have ToZ usable.

    Still running into some problems with Buggered faces/characters
    http://u.cubeupload.com/MrBonk/TalesofZestiria20151.png
    http://u.cubeupload.com/MrBonk/3b1TalesofZestiria20151.png
    http://u.cubeupload.com/MrBonk/8a2TalesofZestiria20151.png
    http://u.cubeupload.com/MrBonk/5bbTalesofZestiria20151.png

    I've also discovered that the pattern match mask bits do play a role in combination with the insertion logic bits. (IE: Take two working flags. Take only the insertion logic bits over to the other and it may not work without the PMM)

    This makes things complicated because we do not know the values that correspond to what.
    :bang:

    However, I may have figured out the PMM perhaps?

    The values are typically 00 00 XX YY
    If we reverse this to YY XX 00 00 , then the bits match up with the material I have available...

    Same thing with the insertion logic bits.
    (EDIT: As it turns out this is true for the parameter bits as well. My explanations are reversed. I've edited them and they match more with Guzz's now http://forums.guru3d.com/showpost.php?p=5180185&postcount=1870)

    But figuring out what works for what is a total crap shoot. There is an infinite number of combinations!:stewpid:

    While it seems largely the Parameter Bits impact the overall look of the AO, the Insertion and Patter Match Mask can be the difference between flickering on and off and bleeding through UI elements and bleeding through some effects.

    Ex: There is a specific bleeding issue that occurs with 2F with ToZ, but replacing the Insertion and PMM with the ones from 24 (which are very similar) fixes that issue so far.
     
    Last edited: Nov 4, 2015
  19. MrBonk

    MrBonk Guest

    Messages:
    3,385
    Likes Received:
    283
    GPU:
    Gigabyte 3080 Ti
    I think i've conquered the beast and figured some **** out !

    0x0000002F

    No AO
    http://u.cubeupload.com/MrBonk/5bbTalesofZestiria20151.png
    http://u.cubeupload.com/MrBonk/3b1TalesofZestiria20151.png
    Default AO
    http://u.cubeupload.com/MrBonk/e1dTalesofZestiria20151.png
    http://u.cubeupload.com/MrBonk/a45TalesofZestiria20151.png
    Modified AO
    http://u.cubeupload.com/MrBonk/b06TalesofZestiria20151.png
    http://u.cubeupload.com/MrBonk/685TalesofZestiria20151.png

    Default settings
    Modified settings
    Inspector settings: http://u.cubeupload.com/MrBonk/inspectoz.jpg

    Also: Is anyone else getting an upload error when using the screenshot key in inspector? I have to Print Screen to get shots of it now.
     
    Last edited: Nov 5, 2015
  20. KoKlusz

    KoKlusz Member Guru

    Messages:
    151
    Likes Received:
    40
    GPU:
    RTX 3080 12 GB
    OK, I got to know how you fixed bleeding through gray-ish areas.
     

Share This Page