Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question [Case 1201827] HDRP 7.1.6 PBR Sky: Simple rotation of Direction light consumes 80 ms of CPU

Discussion in 'High Definition Render Pipeline' started by iamarugin, Nov 29, 2019.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    Empty scene, only PBR Sky and script that rotates Directional light every frame. And I get 12 FPS. It was not the case in the 7.1.5 Any suggestions?
     
  2. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
    Yea, same for me as I mentioned in the pbs feedback thread;
    Hopefully this get fixed soon.
     
  3. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    I doubt that has something to do with the update method of Pbr sky setting and the sample rate, the slider in the setting can go up to 10. There is also a setting to make the sky static or dynamic. That all could have an influence.
     
  4. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    If I do not rotate the light everything is ok.
     
  5. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    If the directional light does not change, the pbr sky have not to be updated. There is an update method setting for the pbr sky. On changed, on demand or always. So updating could be very expensive.

    Hopefully in the future, that will be accounted with a new Realtime GI solution by Unity ...
     
  6. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    No it shouldn't be, because it partially based on Bruneton atmospheric scattering and precomputes sky for all light and view directions. It may be connected with rendering ambient and reflection probes, but even with On Demand option selected it performed terrible. And as I mentioned above it was not the case in 7.1.5 and earlier versions. So something is broken very hard.
     
  7. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    For me it was before 7.15 also. Anything I change in PBS sky setting results in editor freeze till update.
    https://forum.unity.com/threads/physically-based-sky-sun.768977/#post-5120810
     
    Last edited: Nov 29, 2019
  8. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    How to get HDRP version 7.1.6? I'm using the beta but the package update did not show update.
     
  9. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    You need 2019.3.0f1 It is not available in unity hub, so you need to download it directly from unity site.
     
  10. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Why not in Unity Hub? Because it is to unstable? ;)
     
  11. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    Looks like it doesn't bound to the PBR Sky. I've disabled volume profile with it, and it still consumes 80ms when rotating light.
     
  12. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Is it only related to the rotation or also other attributes of the directional light?
     
  13. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
    Not for me though, it only happens with an active pbs, works perfectly fine without it.

    It happens with everything that somehow effects the pbs, so directional light parameters and the pbs settings itself ofc.

    Setting the Ambient Mode to Static gives an extra performance boost, reducing the Number Of Bounces also helps a bit, however it is still way slower as it used to be. Using the realtime update mode with a long update period shows no real advantage either. We're kind of stuck here.
     
    konsic likes this.
  14. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I think final HDRP version will be 7.2.0 so there is advancement coming.
     
  15. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    The scary thing is that 7.1.6 is marked as 2019.3-verified
     
  16. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Release is in 2 weeks so they have time to fix it.
     
    Bordeaux_Fox likes this.
  17. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Are you sure the performence cost is not by architecture? Maybe comparing the the new sky shader with the old one that was more stable.
     
  18. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    936
    Hi, thanks for reporting the issue.
    We are still working and iterating on the PBS sky, thus why it is "Preview" and can't be recommended for production for now despite the HDRP package 7.1.6 being "verified".
     
    optimise likes this.
  19. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Has this been fixed? SSAO showing on wrong screens
     
  20. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    What package and Unity version are you on? A bug like that was fixed, but some time ago.
     
  21. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Latest 7.1.5
     
  22. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Please file a bug and we will have a look.
     
  23. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    The report bug tool crashes and I won't spend more time on it. Good luck finding the problem!.
     
  24. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    887
    Saw the PR that fixes PBR Sky issue. That is great news! Thank you.
     
  25. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
    Seems the massive performance hit has been fixed in 7.1.7