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.19 Reference Guide

ovrLayerEquirect2 Struct Reference

ovrLayerEquirect2 provides support for a single Equirectangular texture at infinity.

Data Fields

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

Detailed Description

For Equirectangular, the vertex coordinates will be transformed as if the texture type was CUBE, and in the fragment shader, the interpolated vec3 will be remapped to vec2 by a direction-to-equirect mapping.
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 come 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 ovrLayerEquirect2::Header ( )
Header.Type must be VRAPI_LAYER_TYPE_EQUIRECT2.
ovrRigidBodyPosef ovrLayerEquirect2::HeadPose ( )
ovrMatrix4f ovrLayerEquirect2::TexCoordsFromTanAngles ( )
ovrTextureSwapChain* ovrLayerEquirect2::ColorSwapChain ( )
Texture type used to create the swapchain must be a 2D target (VRAPI_TEXTURE_TYPE_2D_*).
int ovrLayerEquirect2::SwapChainIndex ( )
ovrRectf ovrLayerEquirect2::TextureRect ( )
ovrMatrix4f ovrLayerEquirect2::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 ovrLayerEquirect2::@5 ovrLayerEquirect2::Textures[VRAPI_FRAME_LAYER_EYE_MAX] ( )
The documentation for this struct was generated from the following file: Include/VrApi_Types.h