I’m not sure if this is the right place to ask my question, any help will be grateful.
I use a tricky way to hack the framebuffer to bind it to Texture2DArray and enable the shader keywords “STEREO_MULTIVIEW_ON”, and my phone support GL_OVR_multiview extension. So far, everything goes well on my phone and I get the view exactly I want properly, except the skybox.
I tried several shaders and make many tests, just can’t get the skybox. I supporse it could be the depth test (Z test) problem, but the transparent objects and opaque objects are just rendering properly. Is there anything special or need to be attention in Unity skybox rendering?
My description may be too simple, here is my git repo: https://github.com/liushijian2ideal/RenderTexture2DArray to show you the details.
BTW, the reason why I do this is because I want to use the new feature single-pass stereo rendering on my Android-based standalone VR headset with its own sdk. It seems that there is not a formal way to use this new feature (like rendering to a Texture2DArray), even though the RenderTexture.dimension could be set to 2DArray, you still just get a single view…
So if anyone knows a better way to implement single-pass stereo rendering, that’s will be great.