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.
  2. Dismiss Notice

Gear VR - eyeTextureResolutionScale not effective

Discussion in 'AR/VR (XR) Discussion' started by reddo, Nov 2, 2017.

  1. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    Using 2017.2.0f3 and building for Gear VR. Imported a project from 5.5
    I am seeing a discrepancy in aliasing on 3d objects using

    UnityEngine.XR.XRSettings.eyeTextureResolutionScale = 1.5f;

    when compared to the old VRSettings.RenderScale in 5.5.

    Aliasing on 3D objects is much more evident in 2017, even with 8xMultisampling in Quality settings, while in 5.5 there is no aliasing around the same objects.

    I've tested the TextureResolutionScale back at 1.0f and it is doing something.
    Also enabled Resolution Scaling in Settings and played around with target pixel density, but it didn't change anything.

    Couldn't find anything about a known issue, but may be missing something. Anyone come across the same behaviour?
     
  2. nat42

    nat42

    Joined:
    Jun 10, 2017
    Posts:
    353
    Possible the difference is related to the Linear vs Gamma space settings?

    I believe MSAA resolve in linear space looks a lot better than doing it in gamma space.
     
  3. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    Tried Linear space setting but aliasing remained.
    Now tested 2017.3f1 and same issue. 5.5.3f1 has no issue

    I use a start scene with a script attached that increases render scale to 1.5, then loads the next scene

    In 5.5.3f1:

    Code (CSharp):
    1. void Start () {
    2.         UnityEngine.VR.VRSettings.renderScale = 1.5f;
    3.         SceneManager.LoadScene(1);
    4.     }
    In 2017.3.1f1

    Code (CSharp):
    1. void Start () {
    2.         UnityEngine.XR.XRSettings.eyeTextureResolutionScale = 1.5f;
    3.         SceneManager.LoadScene(1);
    4.     }
    Allow MSAA is checked on the camera. Forward rendering is being used. I also used the script on the main scene but no chnage.It just appears there's no aliasing applied.
    Any other settings I should check when building for Gear VR in 2017 or some other issue?
     
  4. bradweiers

    bradweiers

    Unity Technologies

    Joined:
    Nov 3, 2015
    Posts:
    59
    I'll look into this but for now I recommend checking out and possibly posting in the Oculus Unity Dev forums as well.
     
  5. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    Thanks for looking into it. Will post to the other forum.
     
  6. bradweiers

    bradweiers

    Unity Technologies

    Joined:
    Nov 3, 2015
    Posts:
    59
    OK. Think of us back here if you find an answer.
     
  7. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    In the end it was related to AA settings which needed to be coded in as setting anything in the Quality settings had no effect. Code used
    QualitySettings.antiAliasing = 4;