We have an application on Steam, using HTC’s Stereo Portal Renderer (asset store, source), that uses portals for some very funky rendering, including image effects on the portals. It’s fairly fragile, because the app was built assuming that SteamVR and HTC Plugins were the one and only centre of the VR universe…
I’m now trying to break the dependency on SteamVR, because we want to run on DayDream, GearVR, etc. The sections of code from HTC’s portal renderer (and yes, I know how to render stereo portals, but the source code asset seems a viable thing to continue using) that need replaced are all in SteamVRParamFactory.cs, and sound like they should have Unity equivalents?
Can anyone please help me out:
SteamVR.instance.sceneWidth can be replaced with UnityEngine.Screen.Width (this seems OK)
What do SteamVR.instance.eyes[eye].rot (and the corresponding
SteamVR.instance.eyes[eye].pos) correspond to? I think they’re the offset of the eyes from the eye centre, but how do you get those in Unity?
I’ve tried naively replacing this:
return SteamVR.instance.eyes[eye].rot; // [eye will be 0 or 1]
with:
VRNode node = (eye == 0) ? VRNode.LeftEye : VRNode.RightEye;
return InputTracking.GetLocalRotation(node);
But this doesn’t seem to be equivalent at all. Can anyone point me to the correct answer, or failing that some documentation on exactly which space these values are returned in?