cancel
Showing results for 
Search instead for 
Did you mean: 

(Unity 2020.3 LTS - URP) OVRVignette renders stretched

SkyArcher
Protege

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

 

com.commutergames.vspeedwayalpha-20220415-124011.jpg

6 REPLIES 6

MetaQuestSupport
Community Manager
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. 

TheDaddis
Protege

Hello, I am having exactly the same issue.

 

Did you find a resolution for it?

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

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

Yeah I totally got rid of that part. I just kept the code for building the double circular meshes and assigning the two materials, then I just place the vignette object in front of the player at a distance that feels ok, then scale the whole vignette object up and down as needed using transform.localScale.

TheDaddis
Protege

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.