How can get the correct camera matrix in a native render plugin?
I want to mix the rendering objects in by a Unity render plugin, such as below:
the white box is rendered by Unity, and the colored terrain is rendered in the native plugin. As the screenshot shows, they are all at the position(0, 0, 0)
when I turn on VR rendering(Oculus), terrain is rendered in both eye's view, but the transform of the terrain mesh is wrong, and moving with oculus's rotation. I guess the problem is caused by view matrix.
here is the code I used in unity. the component is attached to a camera, and native render plugin is called(or queued) in the OnPostRender() method.
So the question is, how can I render the terrain to the correct position in Oculus?
the white box is rendered by Unity, and the colored terrain is rendered in the native plugin. As the screenshot shows, they are all at the position(0, 0, 0)
when I turn on VR rendering(Oculus), terrain is rendered in both eye's view, but the transform of the terrain mesh is wrong, and moving with oculus's rotation. I guess the problem is caused by view matrix.
here is the code I used in unity. the component is attached to a camera, and native render plugin is called(or queued) in the OnPostRender() method.
So the question is, how can I render the terrain to the correct position in Oculus?
