
The sample BoxWorld contains four unity scenes: boxWorld, overlayWorld, planeWorld and gridWorld. The Android BACK button or Windows Escape key will advance to the next scene and exit the application. In the unity editor, right mouse button will control the orientation, and center mouse button the position, of the head. SvrManager.Settings.TrackEyes is enabled for all but the first scene.

boxWorld.unity demonstrates the simple use of stereo left/right eye layers. In the SvrCamera hierarchy, only the 'Eye Left' and 'Eye Right' game objects are active - the others are disabled. Upon SvrCamera initialization, SvrEye components are allocated for the left and right eyes. Unity render textures are created and assigned to each unity camera. The eye target textures are passed to the svr sdk for display processing and timewarp reprojection.

overlayWorld.unity demonstrates the use of stereo overlay layers in addition to the stereo eye layers in the previous example. In the SvrCamera hierarchy, 'Overlay Left' and 'Overlay Right' are now active too. Upon SvrCamera initialization, SvrOverlay components are allocated for the left and right overlays. The overlay layers are displayed after the eye layers. Overlay layers are not timewarp reprojected. In this sample, overlays are used to demonstrate the display of objects that are position relative to the svr head. The Reticle in the center of the screen, Hat near the top and Pointer near the bottom are all displayed smoothly without timewarp reprojection induced judder. The Reticle and Pointer sync to the eyes direction.

planeWorld.unity demonstrates the use of SvrEye and SvrOverlay layer components used to display textures of imageType StandardTexture in addition to RenderTexture. In this sample, the SnapdragonLogo texture is displayed as a camera-space Reticle in the center of the screen and as a world-space object in the level. The SvrEye and SvrOverlay components are Added to the SvrCamera in the scene and the ImageTexture, ImageTransform and ImageCamera objects are assigned. This sample also demonstrates the use of multiple svr objects in the eye layers. The composite order of the objects within the eye or overlay layer is controlled by LayerDepth with larger values draw after smaller values and the overlay layer(s) are drawn after the eye layer(s). The Reticle is synced to the eyes direction.

gridWorld.unity demonstrates the use of foveated rendering with eye render target resolution 2x (2k by 2k). The SvrEye layer components are added with ResolutionScaleFactor greater than one assigned. Foveated rendering is enabled with SvrManager.Settings Foveated Level > None or Gain values greater than zero. Foveated Gain values greater than 1 will cause a reduction in bin resolution toward the extends while Area preserves more of the focal region. The foveated area Focal Point is synced to the eyes position.