04-13-2016 08:49 PM
04-14-2016 11:43 AM
04-14-2016 06:55 PM
vrdaveb said:
Thanks, this seems to be a bug in Camera.worldToCameraMatrix. Your code looks correct and I've reported this to Unity. For now, you can construct your own view matrix using (untested):var m = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(1, 1, -1));var worldToCameraMatrix = m * transform.worldToLocalMatrix;
If that doesn't work, we have some code in our utility script OVROverlay.cs that uses UnityEngine.VR.InputTracking to build up similar pose information. See https://developer.oculus.com/downloads/game-engines/1.3.0/Oculus_Utilities_for_Unity_5 .
04-14-2016 07:48 PM
04-14-2016 09:07 PM
04-14-2016 11:03 PM
vrdaveb said:
Unity must be interpreting the backbuffer in OpenGL conventions, with 0,0 at the bottom left of the texture but treating RenderTextures in D3D conventions, with 0,0 at the top left. When you enable VR, Unity renders to RenderTextures for both eyes instead of rendering directly to the back-buffer. It still seems like code that works for the backbuffer should also work for Unity's automatically-managed eye buffers, so we'll continue to look at this. Is your current code working for you then?
04-18-2016 01:28 AM
vrdaveb said:
Unity must be interpreting the backbuffer in OpenGL conventions, with 0,0 at the bottom left of the texture but treating RenderTextures in D3D conventions, with 0,0 at the top left. When you enable VR, Unity renders to RenderTextures for both eyes instead of rendering directly to the back-buffer. It still seems like code that works for the backbuffer should also work for Unity's automatically-managed eye buffers, so we'll continue to look at this. Is your current code working for you then?
04-20-2016 06:47 AM
04-25-2016 03:13 PM
05-05-2016 07:18 PM
OVROverlay is a screen-space rendering effect, the problem above is a world-space rendering problem, so I cannot find any useful information in OVROverlay.cscybereality said:We still need to do some tests in order to reproduce this issue here. In the meantime, you may want to look at the OVROverlay.cs code, as it does similar things. Hope that helps.