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

Discussion Dynamic Resolution using the built-in render pipeline

Discussion in 'Web' started by dinkelstefan, Jan 26, 2023.

  1. dinkelstefan

    dinkelstefan

    Joined:
    Mar 13, 2019
    Posts:
    30
    Hi there,

    We are struggling with the performance of our WebGL project that is using the Built-in render pipeline. We would like to use Dynamic Resolution scaling for our 3D environment so we can improve the performance for our users.

    It seems that the only way to achieve this with the built in render pipeline is to use devicePixelRatio on the UnityIntance. Sadly this will also scale the UI and make it unreadable.

    Is there anything we can do to just scale the 3D renderer, and not the UI layer?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,420
    My first idea: use two cameras, one for the UI and one for the world. Can‘t advise on the setup though.

    An alternative would be to render either of the two to a rendertexture, and place a quad with the rendertexture as needed above or below the other content. But I would expect this to kill performance in WebGL more than two cameras … but this is just a gut feeling.