Forum Discussion
CogSimGuy
9 years agoProtege
Rendering to Oculus
I have successfully added Oculus support to some rendering code I'm working on however I'm noticing a slight perceived "sway" when looking around. Currently I do all my rendering and post processing passes then copy my color buffer over to an OculusEyeTexture. My suspicion is that the TimeWarp/SpaceWarp needs the depth buffer as well which I'm not currently copying over...looking for some thoughts here before diving into the code.
Thanks
Thanks
4 Replies
- volgaksoyExpert ProtegeThere is no need to pass in a depth buffer. The sway you're seeing could be related to how you're gathering the tracking info via the ovr_GetTrackingState() call. Make sure you're not accidentally requesting the current tracking state, but rather the future/predicted state. For an example, I would recommend you check out the OculusRoomTiny code provided in the SDK samples.
- volgaksoyExpert ProtegeAnother possible problem is how you're dealing with the texture swap chain indices. If you accidentally lag behind by one frame, this will show similar problems. So make sure you're properly querying the new texture swap chain index via ovr_GetTextureSwapChainCurrentIndex() to render into as well as calling ovr_CommitTextureSwapChain() on that texture at the proper time.
- CogSimGuyProtegeThanks for the feedback. The ovr_GetTranckingState() call is good, but I'll take a closer look into the swap chain index...thanks again.
- CogSimGuyProtegeFor anyone who might be of interest, I resolved the issue I was seeing. At some point I'd moved the DirectX12 execute command list call to after the ovr_SubmitFrame call. Once I moved it back to immediately after the swap chain commit call everything was fine again.
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
- 1 year ago
- 2 years ago
- 7 months ago