Optimal Skybox for Mobile VR Oculus Quest/Go/GearVR

What’s everyone else using for a mobile Skybox on Oculus Quest?

In the developing for Android guidelines from Oculus it says

“Avoid Unity’s Default-Skybox, which is computationally expensive for standalone. We recommend setting Skybox to None (Material), and Ambient Source to Color in Window > Lighting. You may also wish to set Camera.clearFlags to SolidColor (never Skybox).”

3 Likes

Gonna necro this, because it’s an obvious thing that turns out not to be so obvious.
Going with a 6 Sided Shader means binding 6 different textures to the graphics pipeline. We can atlas the whole thing, but there doesn’t seem to be an out-of-the-box shader for such a thing…

I’m interested in hearing other people’s suggestions.

2 Likes

FWIW, we opted for simply modeling our own inverted cube, and laying out our own UVs.
We atlassed the texture and simply anchored it to the camera.

What’s left is to play with the render order to ensure it’s last opaque element to draw (we are using Forward Renderer in VR).

2 Likes

Hi KiloGold, Your solution sounds amazing! I’m trying to do just that, but can’t get a shader which I can put on my inverted cube which will be rendered first… Render Queue won’t work. Any ideas??

I wonder if messing with the render queue and everything else is just as unperformant as just using Unity skybox instead? For now I’m just using the Unity Skybox, it wasn’t a huge problem for us.

For Quest, I am using a small 100 vert sphere mesh (as opposed to the default 5k Unity one) with a slightly tweaked unity panoramic skybox shader and it’s working well for me. I draw it in it’s own call after opaques and before tranparents using a buffer.DrawMesh().

2 Likes

Can you share the shader? Thanks in advance.

It’s just the default Unity one with posWorld += _WorldSpaceCameraPos; added so it moves with the camera. Think the SRP APIs .DrawSkybox() method does it CPU side so you have to alter the shader a bit to get it working with a .DrawMesh() call instead.

1 Like

I think you can also use the Unity component Position Constraint although I am not sure what is more optimal performance wise. It is another option.

You might be interested in this:

Skybox Performance Measurements on Oculus Quest

  • CPU/GPU level set to 2

  • Unity 2019.4.5f1

  • Built-in Standard render pipeline

  • Single Pass stereo mode

  • Development Mode

No skybox (camera clears with color):

  • Looking at wall that fills entire screen: GPU ~5.4ms.
  • Looking straight up into the sky: GPU ~4.3ms.

Skybox/Cubemap (exposure 1, rotation 180):

  • Looking at wall that fills entire screen: GPU ~5.2ms.
  • Looking straight up into the sky: GPU ~4.3ms.

The test is not perfect, as the head transform is not guaranteed to be exactly the same. But my takeaway is that a simple cubemap skybox is very cheap on the Oculus Quest.

2 Likes

Do you know of any shader for a stereoscopic skybox that would work on Oculus Quest?

I have been toying with this one without success:

I can’t get it to render correctly. I have a stacked image so I did split it into two separate images and then apply them separately to the material. I get a decent result when I apply the same image on both eyes - but then it isn’t stereo so I could just as well use a normal skybox.