Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feature Request [quest/2] Set eye texture resolution(w,h) or at least independent scaling(w,h)

Discussion in 'VR' started by TheIncredibleCptMoe, Oct 29, 2020.

  1. TheIncredibleCptMoe

    TheIncredibleCptMoe

    Joined:
    Jun 29, 2019
    Posts:
    24
    So, as many of know the Quest HMDs (both) run from the system on sub native resolutions and the only way to set them to native resolution is to use the following adb commands:

    (Quest2 example)
    adb shell setprop debug.oculus.textureWidth 1832
    adb shell setprop debug.oculus.textureHeight 1920

    Further (maybe more importantly) the HMDs run at non native aspect ratios. So scaling, using
    XR.XRSettings.eyeTextureResolutionScale never actually hits exactly native resolution. Non-integer scaling is always blurry compared to integer scaling, unless the frame buffer is ridiculously big (2x+).

    I would really like to see a eyeTextureResolutionSet(int width, int height) function or at least the possibility to have 2 parameters, one for each dimension when using XR.XRSettings.eyeTextureResolutionScale.

    For the sake of visual quality i want to be able to scale one axis up or down, while keeping the other one native.
    Scaling both axes up or down will just look horrible compared to scaling just one axis up or down.

    Everyone can easily test that, using the adb commands with SideQuest, if there is any uncertainty as to the validity of that claim... not that it's a secret or anything ;) The OVR debug tool helps to be installed on the Quest.

    I'm not sure, is that not possible to implement into the XR plugin/api?

    Thanks for taking the time to read my blurb!
     
    huangjun198604 likes this.
  2. huangjun198604

    huangjun198604

    Joined:
    Jul 14, 2017
    Posts:
    1
    XR.XRSettings.eyeTextureResolutionScale didn't work for oculus quest 2
     
  3. TheIncredibleCptMoe

    TheIncredibleCptMoe

    Joined:
    Jun 29, 2019
    Posts:
    24
    @huangjun198604
    Code (CSharp):
    1.  
    2. public void SetRenderScale(float scale)
    3. {
    4.         UnityEngine.XR.XRSettings.eyeTextureResolutionScale = scale;
    5. }
    That works fine for me, running from a gui dropdown, except the fact of course that the aspect ratio is not exactly the native one. And i still would rather just scale the horizontal axis while keeping/setting the vertical one native.

    Make sure you install the OVR debug Overlay thing on your Quest2. You can set it up to show you everything you want, look here please: https://developer.oculus.com/documentation/tools/tools-ovrmetricstool/