Search Unity

Quantifying performance impact of various HDRP settings

Discussion in 'Graphics Experimental Previews' started by dgoyette, Apr 5, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,300
    I migrated my game to HDRP 4-5 months ago, and the biggest challenge for me has been in trying to understand the impact of all of the various settings, both in terms of practical effect as well as in terms of performance. I have some general questions. But first, is this the correct place to go for documentation moving forward?

    https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@5.3/manual/index.html

    I understand that documentation is evolving, but in the mean time, does anyone have recommendations on how to better understand the general technical details of the various HDRP settings? For many of the settings, not only does the description not really tell me anything, but toggling it doesn't show any visual change in my project. So I'm left unsure of whether I "need" certain settings, just because I don't understand exactly when that setting will have an impact.

    An example of this is the "Transparent Backface" option in the HDRP asset settings. Per the docs, it just tells me: "Enables support for transparent back-face render passes. If your Unity Project does not need to make a transparent back-face pass, disable this checkbox to reduce build time." Okay. How do I know if my project needs to make a transparent back-face pass? A lot of the settings are in the docs like this, essentially saying, "Disable this property if you understand what it does and you don't need it," but that doesn't help me understand what it does. So, how do you recommend increasing my understanding of what the various settings do?

    The other big thing is that it's hard for me to evaluate the performance impact of different settings. It's not always as simple as whether my game "needs" a graphical feature. I might "want" a feature, as long as it's not too costly. Ideally there would be some simple way to judge CPU/GPU cost of rendering a view, such that I could toggle various settings and see the results in terms of FPS or some other metric. Does anything like that exist? For example, how would you quantify the performance impact of enabling "High quality" volumetrics, versus just using normal volumetrics?

    Thanks.
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,300
    Maybe a simpler question is, where do people begin to diagnose framerate issues with HDRP? Running my game, about 1ms per frame is my code, and the rest is all within the HDRP rendering. I'm not getting the framerates I'd expect in my scenes, and I'm trying to understand how to figure out what is responsible for that. Currently, my only approach is turning on/off things, and seeing what that does to framerate, but that feels extremely inaccurate.
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,300
    Still hoping to gain some knowledge on how to approach performance tuning in HDRP. I set up a simple test scene containing about 1000 cubes and a dozen spotlights. Profiling a stand-alone build of this room, it just tells me the lights are expensive:

    upload_2019-4-6_17-50-7.png

    But that doesn't really tell me anything actionable. If anyone has suggestions on how to effectively performance tune an HDRP game, I'd love to hear about your process.

    I'm also a little confused about whether I'm CPU or GPU bound in rendering this scene. The standalone game's process is using about 52% of the total CPU, but the GPU isn't maxed out either. Is this normal? I was expecting that whichever one I was "bound" by would be maxed out?

    upload_2019-4-6_17-53-46.png
     
  4. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    64
    One thing I find somewhat useful is counting the number of frames that were actually rendered per second and compare that to the number displayed in the stats tab of the game window. I believe the value from the stats tab is entirely based on the cpu time taken to render the frame and is often a lot higher than the actual framerate. If the two values are the same, you are cpu limited.
     
  5. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    329
    @dgoyette ,
    where you able to figure out what is performance heavy in the HDRP ?
     
  6. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,300
    Not directly. I have no better ability now than I did four months ago in pinpointing specific issues. Instead, my approach has just been to rely on general graphics efficiency gains, like LOD and occlusion culling to keep the rendering costs down. As long as these general approaches land me in an acceptable FPS range, I'm not pushing too much harder on figuring out the performance cost of specific shader features.
     
    manutoo likes this.
  7. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    329
    @dgoyette ,
    thanks for your answer ; I guess I might take the same road... :)
     
  8. Gasimo

    Gasimo

    Joined:
    Mar 3, 2015
    Posts:
    14
    Profiler should now show some additional details around HDRP, it would be nice to see a graph like this:
    Some of the options are really unclear, I created a new asset and am getting very unstable framerates in a simple scene with 40k tris and 1 spot light (1k shadows) with the default hdrp settings and volumetric fog... ranging from 40-120... mostly around 48.
     
  9. holyfot

    holyfot

    Joined:
    Dec 16, 2016
    Posts:
    10
    So far Shadow Maps (and lowering its resolution), Turning off Reflection Probes and VSync have the biggest impacts that I can see. Also using Baked GI + Baked-Indirect Lighting + Progressive GPU had a big boost on performance.
     
    Last edited: Feb 15, 2020 at 9:18 AM
unityunity