Forum Discussion
tmason101
11 years agoHonored Guest
Accessing and using ovrPosef from different threads?
Hello,
I am wondering if anyone has any thoughts on using the data you get from ovrHmd_GetEyePose() on a separate thread for processing.
Currently the calculations for my camera and the drawing are done on the same thread but if I can move the calculations for the camera on a separate thread I can get some performance gains.
Thank you for your time.
I am wondering if anyone has any thoughts on using the data you get from ovrHmd_GetEyePose() on a separate thread for processing.
Currently the calculations for my camera and the drawing are done on the same thread but if I can move the calculations for the camera on a separate thread I can get some performance gains.
Thank you for your time.
4 Replies
- jhericoAdventurerIf you want to fetch tracking data from a non-rendering thread, or outside of the BeginFrame/EndFrame calls, use ovrHmd_GetTrackingState(). GetEyePose() is pretty much strictly for use for getting a rendering pose for a given eye.
What kind of calculations are you doing, exactly, that makes you think that doing them on the rendering thread is significant? - tmason101Honored Guest
"jherico" wrote:
If you want to fetch tracking data from a non-rendering thread, or outside of the BeginFrame/EndFrame calls, use ovrHmd_GetTrackingState(). GetEyePose() is pretty much strictly for use for getting a rendering pose for a given eye.
What kind of calculations are you doing, exactly, that makes you think that doing them on the rendering thread is significant?
Basic camera work (Projection+View Matrix) as well as incorporating physics tracking, etc.
I already offloaded physics calculations itself to another thread and would like to have the rendering done on as tight a loop as possible without anything else beyond what is needed. - jhericoAdventurer
"tmason101" wrote:
Basic camera work (Projection+View Matrix) as well as incorporating physics tracking, etc.
I already offloaded physics calculations itself to another thread and would like to have the rendering done on as tight a loop as possible without anything else beyond what is needed.
For the Rift, projection matrices are fixed, based on your FOV port. And manipulating the modelview matrix is a trivial amount of computation. For the purposes of rendering, you could use a pre-setup modelview from another thread, but the GetEyePose() calls are specifically optimized to try to return the best head pose for the next frame to be rendered. - tmason101Honored Guest
"jherico" wrote:
For the Rift, projection matrices are fixed, based on your FOV port. And manipulating the modelview matrix is a trivial amount of computation. For the purposes of rendering, you could use a pre-setup modelview from another thread, but the GetEyePose() calls are specifically optimized to try to return the best head pose for the next frame to be rendered.
Thank you; trying to get the rendering done as fast as possible.
I'll definitely get your book as soon as it is available. You always give valuable feedback.
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
- 5 months ago
- 18 days ago
- 9 months ago
- 2 months ago