Forum Discussion
kaetemi
11 years agoHonored Guest
SDK 0.4.0 struct ovrDistortionVertex
The 'ovrDistortionVertex' struct in the SDK 0.4.0 does not match the documentation, and I have no clue what to do with this.
Either that, or I'm drunk.
This is the struct as in the SDK...
This is the example code...
Or did they just rename all the parameters?
Either that, or I'm drunk.
This is the struct as in the SDK...
/// Describes a vertex used by the distortion mesh. This is intended to be converted into
/// the engine-specific format. Some fields may be unused based on the ovrDistortionCaps
/// flags selected. TexG and TexB, for example, are not used if chromatic correction is
/// not requested.
typedef struct ovrDistortionVertex_
{
ovrVector2f ScreenPosNDC; // [-1,+1],[-1,+1] over the entire framebuffer.
float TimeWarpFactor; // Lerp factor between time-warp matrices. Can be encoded in Pos.z.
float VignetteFactor; // Vignette fade factor. Can be encoded in Pos.w.
ovrVector2f TanEyeAnglesR;
ovrVector2f TanEyeAnglesG;
ovrVector2f TanEyeAnglesB;
} ovrDistortionVertex;
This is the example code...
DistortionVertex * v = pVBVerts;
ovrDistortionVertex * ov = meshData.pVertexData;
for ( unsigned vertNum = 0; vertNum < meshData.VertexCount; vertNum++ )
v->Pos.x = ov->Pos.x;
v->Pos.y = ov->Pos.y;
v->TexR = (*(Vector2f*)&ov->TexR);
v->TexG = (*(Vector2f*)&ov->TexG);
v->TexB = (*(Vector2f*)&ov->TexB);
v->Col.R = v->Col.G = v->Col.B = (OVR::UByte)( ov->VignetteFactor * 255.99f );
v->Col.A = (OVR::UByte)( ov->TimeWarpFactor * 255.99f );
v++;
Or did they just rename all the parameters?
2 Replies
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 years ago
- 11 years ago
- 11 years ago