How can get the correct camera matrix in a native render plugin?

have tried to pass Camera.current.worldToCameraMatrix and GL.GetGPUProjectionMatrix(Camera.current.projectionMatrix, VRSettings.enabled) in to the native plugin, but the mesh rendered by native plugin is not at the same position as Unity renders.

Is there any ideas how to get the correct camera matrix for VR?

or can I use the constant buffer of Unity in a native render plugin? then I can use the matrix in shader directly

although the native rendering objects can be seen in Oculus, but the “projection” seems not right.

you can see the blow images, if I move from far to near, the “native” terrain object looks like moved a little at the same time.

Hi xoyojank!

Were you able to solve this issue in the meantime? I’m having similar issues while experimenting with native rendering plugins in VR and will be glad if you share your insights from this…

Thanks for your help!
Best regards