[Solved] Can't see skybox in single-pass stereo rendering

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.

Finally, I figured out that I used a wrong View and Projection Matrix for skybox rendering.
Since Unity5, the skybox render after the opaque things with a different UNITY_MATRIX_VP. You have no need to worry about that for normal use, but as I need to use single-pass stereo rendering in a tricky way, I have to handle the shader’s constant buffer all by myself.
So I set the Unity_StereoMatrixXXX shader values each frame before rendering, what I didn’t realize that time is the skybox rendering using a different “unity_StereoMatrixVP” value. So I use the CommandBuffer to set the right value before skybox rendering and change it back after. Detail could be found in my git repo.

Here is still something I don’t understand totally, the view matrix must be generated by world center, position vector3.zero, ok, get it. But the Projection Matrix, I must set the value m22 of the matrix to -1.0f, then I could get the skybox, other wise, just black. Still studing on this, I wish to understand the theoretical reason, if anyone could give me some explanation that will be very grateful.