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).”
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.
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().
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.
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.
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.