Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Fps drop randomly and when restart are ok again

Discussion in 'High Definition Render Pipeline' started by NewMagic-Studio, May 30, 2023.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    Hi,
    I was getting crazy testing fps when i see that gives different fps randomly with the same scene. I got 90fps with VR, then i enable some objects give me 45 fps, disable those objects again and i get around 45fps again, restart Unity and i get 90fps again. I was enabling and disabling VFX graph particles and local fog, don't know if is related to that.
     
  2. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    317
    You will need to run the profiler to spot the difference between the low / high frame rate states.
     
  3. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    I already answered on your similar question here:
    https://forum.unity.com/threads/45-fps-with-just-one-particle-system-with-hdrp-vr.1440832/

    the fps will switch to 45 fps if it drops too much below 90 fps, interpolating the missing frames to "simulate" 90 fps. So it's not helpful to just look at fps as a measurement for performance, better to look at GPU and CPU time per frame.
    Whatever the reason is for the drop in your case is something you need to find out yourself by profiling. In general, you should use as less post processing as possible in VR, as it needs to be calculated on a lot of pixels (depending on your headset resolution). Fog is also performance killer in VR.
    I also encountered severe performance issues in newer versions of Unity Editor (I tried 2023.1 beta), did some bug reports about this, but Unity QA seems to struggle a bit with understanding them.
     
  4. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    No, it is not the same issue, in this case i get stable 90fps, then stop the gameplay, start again and i get just 45. The other question was that in the same gameplay it was bouncing 45-90 90-45 randomly. In this case when i restart editor gives me 90fps
     
  5. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    The FPS is relatively meaningless as an instrument to measure performance, best is to use the profiler to see what’s going on. And what Unity version are you using?
     
  6. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    Never got to resolve anything looking at the profiler. Don't know why you say fps is meaningless
     
  7. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    I tried to explain above. If you have a slight fps drop, it will immediately go down to 45 fps and interpolate the missing frames to stay at perceived 90fps. And the profiler is an instrument you definitely need to start learning if you want to use HDRP with VR, no way around this.
    And again what Unity version are you using?
     
  8. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    If you read my original post in the other question i already know that, dont know why you think i dont know that. I investigate what the profiler says but doesnt resolve anything if say for instance is said waitforpresent doesnt solve me anything as i would already know it is a gpu bound app
    And i said it is not cause the GPU, it is cause Unity is bugged, but you keep saying i look for the profiler dont know why
    I am using Unity 2021.3.21f1
     
    Last edited: May 30, 2023
  9. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    I guess you should try to be more supportive if people want to help you here in the forum, spending their valuable time.
    If you know that you are GPU bound, enable the GPU profiler, and look where the time goes.