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

Best strategy for adaptively adjusting performance at runtime?

Discussion in 'Universal Render Pipeline' started by antifuzz, Jan 15, 2020.

  1. antifuzz

    antifuzz

    Joined:
    Feb 22, 2013
    Posts:
    99
    We're working on an iOS and Android app using URP, and we're fining that on cheaper Android phones, performance is pretty bad (no massive surprise there). It can improved a lot by turning off shadows, reducing msaa, removing PostProcessing effects etc, but obviously we don't want to make these reductions in quality for all users, only those that need it.

    My question is what's the best strategy for adaptively changing these sort of settings at runtime to scale back the visual capability on devices that are running slowly?

    I get that you can create another instance of UniversalRenderPipelineAsset with different settings on it but can you actually switch between them at runtime? Anything to be aware of with doing that?

    Also, does anyone have recommendations as the best method of determining when to use the fallback / reduced settings or not? I mean... simply watching the frame rate and switching to lower settings if it drops below a certain threshold sounds a bit clunky, but maybe it's the best route..?
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    it really depend on phone, for example mali 400 is really old, but it's tile based so msaa 4x is free literally, the issue is fill rate and vertex is independent unlike unified architecture, and if you write custom shader in open gl using variant like ARM_* you can squeeze some more effect, as unity don't use vendor specific variant only generic one.

    So either you have an idea of the various type of phone and their specificity, or you shoot for a generic common denominator.
     
  3. lloydv

    lloydv

    Joined:
    Sep 15, 2015
    Posts:
    55
    I too would like to know if it's possible to change pipeline asset settings at runtime.

    As far as adjusting performance, I think it's a good idea to give the player control of that (for example, a "Low/Normal/High" toggle in the settings).

    After all, some of this boils down to preference or how the player is playing at a given time. Maybe they usually like high-quality settings but they're away from a charging point for a while and want to conserve battery life. Or maybe they can run the game on medium settings OK but prefer low because their device doesn't heat up as much.
     
  4. liiir1985

    liiir1985

    Joined:
    Jul 30, 2014
    Posts:
    147
    And set render scale to something smaller than 1 will also boost performance significantly on mobile(0.85 will save about 30% performance and hard to notice on the phone)