0
votes

I installed Unity 5.2.0f3 Personal and got the example of a low-level rendering plugin from Unity doc site. I made some changes so the project scene displays:

  • A sphere and a plane rendered by Unity. The texture of the plane is updated from the plugin.
  • A plane rendered by the plugin (using OpenGL ES 2).

The plane rendered by the plugin is rendered at the end of every frame, so it doesn't interfere with Unity pipeline. So far, this works on PC and Android.

Recently I tried to port the project to Google Cardboard (by installing the SDK package, adding the CardboardAdapter prefab to MainCamera and so on). The problem is that making the plugin render the plane at the end of every frame leaves the plane out of the "fancy stuff" that Google Cardboard makes so the scene is rendered with VR: the sphere and plane previusly rendered by Unity are now rendered through Google Cardboard eyes, but my plane isn't.

I moved the call to my plugin inside of the method "render()" in the script "CardboardEye.cs", but I can't find the right place for it. The plane is hidden behin the Cardboard visor or it is rendered outside the Cardboard visor, or ...

So at this point my questions are two:

  • Is it possible to effectively mix Unity and plugin rendering using Google Cardboard?
  • If so, how?

Thank you.

1

1 Answers

0
votes

Well, I had more luck on this post in the "Cardboard & VR Developers" Google+ group.

Basically, I made the following changes:

  1. Updating the Google Cardboard SDK for Unity to v0.5.2.
  2. Placing my call to GL.IssuePluginEvent in method OnRenderObject() (Unity script).

Now it works!.