cancel
Showing results for 
Search instead for 
Did you mean: 

XRSettings.renderViewportScale on the Oculus Go

mattbenic
Protege
Hi 
I'm working on an app where the fidelity of text on textures is really important, so I'm using XRSettings.eyeTextureResolutionScale to bump up the overall scene quality. This is working nicely but obviously has a performance cost. I tried switching it at runtime, so most of the time I'd run at 1:1 texture size, and then switch up to 1:2 (or higher) when the user is viewing a texture containing text. This causes a stutter as the main render texture is reallocated, so it's not really an option.

So my next thought was to use a high XRSettings.eyeTextureResolutionScale, and use a XRSettings.renderViewportScale < 1 for normal rendering, then bump XRSettings.renderViewportScale up to 1 for the texture with text case. My understanding of (for example) using XRSettings.eyeTextureResolutionScale = 2 and XRSettings.renderViewportScale = 0.5 is that I'd essentially get native resolution and no performance drop (just losing a bit of texture memory).

However trying XRSettings.eyeTextureResolutionScale = 3 and XRSettings.renderViewportScale = 0.5 on the go, I get the following:
renderViewportScale1png

If I set XRSettings.eyeTextureResolutionScale = 3 and XRSettings.renderViewportScale = 0.1 I get the following:
renderViewportScale2png

So what appears to be happening is that the viewport is correctly being used to render but on the left eye only XRSettings.renderViewportScale% of the resulting viewport is being rendered.

Has anyone else run into this and found a solution, or can anyone suggest what I might be misunderstanding in the use of this API?

Thanks.

(Unity 2018.4.8f1, Oculus Android 1.38.2)
0 REPLIES 0