Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
SkyArcher's avatar
SkyArcher
Protege
4 years ago

(Unity 2020.3 LTS - URP) OVRVignette renders stretched

As you can see in the picture below, OVRVignette is rendering with a bad aspect ratio, and it also clips through some of the geometry despite being assigned to Overlay rendering queue in its own script. The vertical size seems correct, but the horizontal one is way too narrow.

 

This issue seemingly appeared out of nowhere because I clearly recall testing the vignette accurately when I first implemented it months ago, both in the editor and in Quest. Probably nobody ever used that because the issue has been reported only a bunch of days ago, so I have no idea when things broke down, I suspect after a firmware or SDK update.

 

At the moment the vignette still behaves and looks correct (perfectly circular) in the editor, but it looks like the pic below in Quest. The lossy scale of the vignette GameObjects is 1, 1, 1, the aspect ratio is set to 1. Also all the GameObjects up to the root have a scale of 1, 1, 1. Rebuilding the vignette mesh at runtime does not solve this. I don't do any scale operation or any other fancy thing to the player and the camera- after all it worked perfectly before and I haven't touched the camera or the player GameObject since.

 

I suspect something else might be altering this, so any insight is very appreciated.

Unity 2020.3.23 - URP 10.7.0 - Oculus Integration 38.0 - XR Plugin Management 4.2.1 - Oculus XR Plugin 1.11.2

 

6 Replies

  • MetaStoreHelp's avatar
    MetaStoreHelp
    Community Manager

    Hey, skyArcher! We would first like to thank you for bringing this issue to our attention, and that we are sorry to hear that you are experiencing that. We would recommend that you place a support ticket with us so we can have one of our specialists look into it and get a speedy resolution for you. 

  • Hello, I am having exactly the same issue.

     

    Did you find a resolution for it?

    • SkyArcher's avatar
      SkyArcher
      Protege

      Yes, I used part of the code in OVRVignette.cs to make my own version, independent from any device or SDK feature. ğŸ˜…

      • TheDaddis's avatar
        TheDaddis
        Protege

        Good to know! Would you mind sharing what you changed? I'm guessing maybe something to do with GetTanFovAndOffsetForStereoEye()?

  • Cooool, ok thanks!

     

    I've got it working, by changing line 366 from:

     

    if (_Camera.stereoEnabled)

     

    to:

     

    if (OVRManager.isHmdPresent)

     

    And that seems to do the trick. Looks like _Camera.stereoEnabled is not (any longer?) set for the Centre Eye when in HMD.