Oculus SDK Source

0.6.0.0-beta | Published 2015-05-15
I have read and agree to the terms of the EULA, Terms of Use and Privacy Policy

Oculus SDK Source 0.6.0.0-beta

The Oculus SDK 0.6 introduces the compositor, a separate process for applying distortion and displaying scenes and other major changes.

There are four major changes to Oculus SDK 0.6:

  • The addition of the compositor service and texture sets.
  • The addition of layer support.
  • Removal of client-based rendering.
  • Simplification of the API.

The compositor service moves distortion rendering from the application process to the OVRServer process using texture sets that are shared between the two processes. A texture set is basically a swap chain, with buffers rotated to allow game rendering to proceed while the current frame is distorted and displayed.

Layer support allows multiple independent application render targets to be independently sent to the HMD. For example, you might render a heads-up display, background, and game space each in their own separate render target. Each render target is a layer, and the layers are combined by the compositor (rather than the application) right before distortion and display. Each layer may have a different size, resolution, and update rate.

The API simplification is a move towards the final API, which primarily removes support for application-based distortion rendering.

New Features

The following are major new features for the Oculus SDK and runtime:

  • Added the compositor service, which improves compatibility and support for simultaneous applications.
  • Added layer support, which increases flexibility and enables developers to tune settings based on the characteristics and requirements of each layer.
  • Significantly improved error handling and reporting.
  • Added a suite of new sample projects which demonstrate techniques and the new SDK features.
  • Removed application-side DirectX and OpenGL API shims, which results in improved runtime compatibility and reliability.
  • Simplified the API, as described below.
  • Changed Extended mode to use the compositor process. Rendering setup is now identical for extended and direct modes. The application no longer needs to know which mode is being used.
  • Extended mode can now support mirroring, which was previously only supported by Direct mode.
  • Simplified the timing interface and made it more robust by moving to a single function: ovrHmd_GetFrameTiming.
  • Fixed a number of bugs and reliability problems.

The following are major new features for Unity:

  • Disabled eye texture anti-aliasing when using deferred rendering. This fixes the blackscreen issue.
  • Eliminated the need for the DirectToRift.exe in Unity 4.6.3p2 and later.
  • Removed the hard dependency from the Oculus runtime. Apps now render in mono without tracking when VR isn't present.

API Changes

This release represents a major revision of the API. These changes significantly simplify the API while retaining essential functionality. Changes to the API include:

  • Removed support for application-based distortion rendering. Removed functions include ovrHmd_CreateDistortionMesh, ovrHmd_GetRenderScaleAndOffset, and so on. If you feel that you require application-based distortion rendering, please contact Oculus Developer Relations.
  • Introduced ovrSwapTextureSets, which are textures shared between the OVRServer process and the application process. Instead of using your own back buffers, applications must render VR scenes and layers to ovrSwapTextureSet textures. Texture sets are created with ovrHmd_CreateSwapTextureSetD3D11/
  • OpenGL and destroyed with ovrHmd_DestroySwapTextureSet.
  • ovrHmd_BeginFrame was removed and ovrHmd_EndFrame was replaced with ovrHmd_SubmitFrame.
  • Added a new layer API. A list of layer pointers is passed into ovrHmd_SubmitFrame.
  • Improved error reporting, including adding the ovrResult type. Some API functions were changed to return ovrResult. ovrHmd_GetLastError was replaced with ovr_GetLastErrorInfo.
  • Removed ovr_InitializeRenderingShim, as it is no longer necessary with the service-based compositor.
  • Removed some ovrHmdCaps flags, including ovrHmdCap_Present, ovrHmdCap_Available, ovrHmdCap_Captured, ovrHmdCap_ExtendDesktop, ovrHmdCap_NoMirrorToWindow, and ovrHmdCap_DisplayOff.
  • Removed ovrDistortionCaps. Some of this functionality is present in ovrLayerFlags. ovrHmdDesc no longer contains display device information, as the service-based compositor now handles the display device.
  • Simplified ovrFrameTiming to only return the DisplayMidpointSeconds prediction timing value. All other timing information is now available though the thread-safe ovrHmd_GetFrameTiming. The ovrHmd_BeginFrameTiming and EndFrameTiming functions were removed.
  • Removed the LatencyTest functions (e.g. ovrHmd_GetLatencyTestResult).
  • Removed the PerfLog functions (e.g. ovrHmd_StartPerfLog), as these are effectively replaced by ovrLogCallback (introduced in SDK 0.5).
  • Removed the health-and-safety-warning related functions (e.g. ovrHmd_GetHSWDisplayState). The HSW functionality is now handled automatically.
  • Removed support for automatic HMD mirroring. Applications can now create a mirror texture (e.g. with ovrHmd_CreateMirrorTextureD3D11 / ovrHmd_DestroyMirrorTexture) and manually display it in a desktop window instead. This gives developers flexibility to use the application window in a manner that best suits their needs, and removes the OpenGL problem with previous SDKs in which the application back-buffer limited the HMD render size.
  • Added ovrInitParams::ConnectionTimeoutMS, which allows the specification of a timeout for ovr_Initialize to successfully complete.
  • Removed ovrHmd_GetHmdPosePerEye and added ovr_CalcEyePoses.

Bug Fixes

The following are bugs fixed since 0.5:

  • HmdToEyeViewOffset provided the opposite of the expected result; it now properly returns a vector to each eye's position from the center.
  • If both the left and right views are rendered to the same texture, there is less "bleeding" between the two. Apps still need to keep a buffer zone between the two regions to prevent texture filtering from picking up data from the adjacent eye, but the buffer zone is much smaller than before. We recommend about 8 pixels, rather than the previously recommended 100 pixels. Because systems vary, feedback on this matter is appreciated.
  • Fixed a crash when switching between Direct and Extended Modes.
  • Fixed performance and judder issues in Extended Mode.

Known Issues

The following are known issues:

  • Switching from Extended Mode to Direct Mode while running Oculus World Demo causes sideways rendering.
  • Judder with Oculus Room Tiny Open GL examples in Windows 7.
  • The Oculus Configuration Utility can crash when the Demo Scene is repeatedly run.
  • Application usage of CreateDXGIFactory can result in reduced performance; applications should use CreateDXGIFactory1 instead. Support for CreateDXGIFactory is deprecated in this release and will be removed in a future release.
  • For Windows 7 in Extended Mode, any monitors connected to the computer go black when the headset is on and return to normal operation when the headset is removed.
  • For Windows 7 in Extended Mode, if the headset is placed above the monitor(s), all displays might go black. The workaround is to place the headset to the right or left of the monitor(s).
  • PC SDK applications will crash if the OVR service is not running.