This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy

Mobile 1.17 Reference Guide

ovrLayerCylinder2 Struct Reference

ovrLayerCylinder2 provides support for a single 2D texture projected onto a cylinder shape.

Data Fields

ovrLayerHeader2
Header ( )
Header.Type must be VRAPI_LAYER_TYPE_CYLINDER2.
ovrRigidBodyPosef
ovrTextureSwapChain *
Texture type used to create the swapchain must be a 2D target (VRAPI_TEXTURE_TYPE_2D_*).
int
ovrMatrix4f
ovrRectf
ovrMatrix4f
struct ovrLayerCylinder2::@9

Detailed Description

For Cylinder, the vertex coordinates will be transformed as if the texture type was CUBE. Additionally, the interpolated vec3 will be remapped to vec2 by a direction-to-hemicyl mapping. This mapping is currently hard-coded to 180 degrees around and 60 degrees vertical FOV.
After the mapping to 2D, an optional textureMatrix is applied. In the monoscopic case, the matrix will typically be the identity matrix (ie no scale, bias). In the stereo case, when the image source comes from a single image, the transform is necessary to map the [0.0,1.0] output to a different (sub)rect.
Regardless of how the textureMatrix transforms the vec2 output of the equirect transform, each TextureRect clamps the resulting texture coordinates so that no coordinates are beyond the specified extents. No guarantees are made about whether fragments will be shaded outside the rect, so it is important that the subrect have a transparent border.

Field Documentation

ovrLayerHeader2 ovrLayerCylinder2::Header ( )
Header.Type must be VRAPI_LAYER_TYPE_CYLINDER2.
ovrRigidBodyPosef ovrLayerCylinder2::HeadPose ( )
ovrTextureSwapChain* ovrLayerCylinder2::ColorSwapChain ( )
Texture type used to create the swapchain must be a 2D target (VRAPI_TEXTURE_TYPE_2D_*).
int ovrLayerCylinder2::SwapChainIndex ( )
ovrMatrix4f ovrLayerCylinder2::TexCoordsFromTanAngles ( )
ovrRectf ovrLayerCylinder2::TextureRect ( )
ovrMatrix4f ovrLayerCylinder2::TextureMatrix ( )
Note:
textureMatrix is set up like the following: sx, 0, tx, 0 0, sy, ty, 0 0, 0, 1, 0 0, 0, 0, 1 since we do not need z coord for mapping to 2d texture.
struct ovrLayerCylinder2::@9 ovrLayerCylinder2::Textures[VRAPI_FRAME_LAYER_EYE_MAX] ( )
The documentation for this struct was generated from the following file: Include/VrApi_Types.h