SDK rendering in Unity
Hello, I was wondering if anyone had any information on exactly how to integrate SDK rendering into a Unity project rather than using the game engine rendering alternative. They talk about the use and benefits of SDK rendering here
http://www.gdcvault.com/play/1020713/Working-with-the-Latest-Oculus
here is the code example from that presentation
It sounds like instead of using the OVRCameraController prefab we would instead use only a camera left and camera right to render the undistorted frames in Unity and pass that to the SDK as textures which will then distort the image and do it in a better way. Honestly, I have not had time to check out the SDK much, I'm not entirely sure how to accomplish this. Does anybody have more info about this? Thanks in advance.
http://www.gdcvault.com/play/1020713/Working-with-the-Latest-Oculus
here is the code example from that presentation
ovrFrame hmdframe = ovrHmd_BeginFrame(hmd);
for (int eyeIndex = 0; eyeIndex < ovrEye_Count; eyeIndex++)
{
ovrEyeType eye = HmdDesc.EyeRenderOrder[eyeIndex];
ovrPosef eyeRenderPose = ovrHmd_BeginEyeRender(hmd, eye);
RenderGameView(RenderViewports[eye], eyeRenderPose);
ovrHmd_EndEyeRender(hmd, eye, &EyeTexture[ye].Texture);
}
//Let OVR do timewarp, distortion rendering, Present and Flush+Sync
ovrHmd_EndFrame(hmd);
It sounds like instead of using the OVRCameraController prefab we would instead use only a camera left and camera right to render the undistorted frames in Unity and pass that to the SDK as textures which will then distort the image and do it in a better way. Honestly, I have not had time to check out the SDK much, I'm not entirely sure how to accomplish this. Does anybody have more info about this? Thanks in advance.
