Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Fixed] HDRP FSAA & SSAO Performance Issue

Discussion in 'Graphics Experimental Previews' started by manutoo, Aug 16, 2019.

  1. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    522
    Hello,

    I just built my new tennis game prototype using Unity 2019.1.12f1 + HDRP 5.16.1 .

    And I just compared the performances with my previous tennis game, in a nearly identical view, using Unity 5.6.7 + the Post Processing stack v1.

    The FSAA now takes 0.1ms instead of ~0.005ms . This is 20 times slower..! :eek:
    Plus it looks blurrier than the old one, which makes it barely usable.

    The SSAO now takes 0.6ms instead of ~0.005ms. This is 120 times slower..! :confused:

    How comes ?

    The new MSAA takes 0.6ms, which seems a lot as well.

    Test process on my NVidia GTX 1060 6GB at 1920x1080 : with VSync off, I check the highest fps in the game with each effect off, then I turn on one and check the highest fps again ; ms = 1000 * (1 / Fps2 - 1 / Fps1)

    EDIT - Fixed:
    => https://forum.unity.com/threads/fixed-hdrp-fsaa-ssao-performance-issue.728771/#post-4866173
     
    Last edited: Aug 17, 2019
  2. asdzxcv777

    asdzxcv777

    Joined:
    Jul 17, 2017
    Posts:
    29
    YOU are the man ... checking all this stuff :cool::cool::cool::):):)
     
  3. hatless

    hatless

    Joined:
    Dec 15, 2010
    Posts:
    48
    0.005ms.isn't a real measurement. Whatever you're measuring, it isn't the speed of the shader.
     
  4. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    522
    @hatless,
    ouch, you were right !

    I had forgotten to turn off the Application.targetFrameRate, so I was hitting its limit with my previous game.

    For my defense, Process Explorer GPU Usage Graph had died on me when I had calculated that, so I couldn't check if the GPU was actually used at 100%... :p

    Everything is working like it should now, so here the corrected values :

    SSAO : now 0.55ms, was 0.8ms => 30% faster ! :D
    FAAA : 0.1ms -> 0.25ms => 60% faster ! (but still looks blurrier :confused:)
    MSAA : 0.65ms ; still significantly costlier than the new FAAA, but not that much compared to the old one

    So this leaves me with my main issue, without SSAO nor FSAA :
    - old game FPS = 510
    - new one, with ~15 more gameobjects & materials, and ~30k more polys (on screen) = 132

    This is an even badder hit than what I thought at 1st, so I'm going to check more and I'll open a new topic when I know more about what's going on... o_O
     
    Last edited: Aug 17, 2019
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You should know that measuring with process explorer has not worked, never will work as a measurement. This is because performance of a GPU isn't related to how much of it is in use. You could just be using 20% of it and it'd have finished its jobs and be waiting for other stuff. It doesn't mean anything.

    You should be thinking in terms of how much bandwidth is in use, and if that is the bottleneck or not (it usually will be).
     
  6. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    522
    @hippocoder ,
    I use Process Explorer to be sure I'm not under ~100% of usage, but it doesn't measure the fps, nor how well are used these 100%.
    When Unity is waiting because of Application.targetFrameRate, then the usage is under 100%. If the graph hadn't disappeared when I did my measures at 1st, then I'd have noticed it and I'd have likely thought about the frame cap (or not, but at least I'd have had a better chance :p).
    It's also a decent way to check if I'm GPU or CPU bound when I test stuff within the editor.

    It's surely not perfect, but so far I never noticed a discrepency when I check CPU, GPU & Fps. So it's way better than not using it (I saw some pretty stupid assessments by people only checking Unity stats). However, if you have a better tool, I'm all ears. :)
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Nope, it has no real measurement of quality at all, just coincidences. There is no good reason to use it over a proper measurement tool or even the unity profiler.