cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Orthographic Projection 2D Offset in HMD Pixels?

mindabuse
Explorer
This might sound like an odd request, given that the Oculus SDK provides a way of generating an Orthographic Projection matrix at varying "distances" for 2D rendering.

I'm working with some legacy OpenGL code and want to keep the supporting Oculus changes minimal. I would like to draw the UI elements at their native "pixel" resolutions as far as pre-distortion (SDK) rendering is concerned. This is less of an issue with the DK2, as it appears that one can draw 2D images in the center of each eye and the lens distortion conveniently makes this (somewhat?) "close enough to normal". However, testing the same approach on the DK1 does not work.

In order to achieve this goal, I'll need to calculate a 2D x-axis offset to bump the UI elements for each eye.

How could I go about doing this in a way that would work "universally" for the DK1, DK2 and future HMDs? I'm hoping there Is a way to calculate this based on the Oculus SDK orthographic projection and the HMD's resolution.

Any insight would be most appreciated.
0 REPLIES 0
Still need help?

Did this answer your question? If it didn’t, use our search to find other topics or create your own and other members of the community will help out.

If you need an agent to help with your Meta device, please contact our store support team here.

Having trouble with a Facebook or Instagram account? The best place to go for help with those accounts is the Facebook Help Center or the Instagram Help Center. This community can't help with those accounts.

Check out some popular posts here:

Getting Help from the Meta Quest Community

Tips and Tricks: Charging your Meta Quest Headset

Tips and Tricks: Help with Pairing your Meta Quest

Trouble With Facebook/Instagram Accounts?