I 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
↧