Forum Discussion
CogSimGuy
10 years agoProtege
Oculus Integration
Hey all, I have an application that renders in Directx 12 and I want to integrate to Oculus. I am currently doing all my different rendering in HDR then making a full screen tone map pass (with a couple other things) into my swap chain back buffer. For Oculus support I'm hoping I can just make the tone map pass into the Oculus swap chain? I'd like to take advantage of ATW, etc and I was hoping someone can give me an AUTHORITATIVE pseudo code sequence or verify/edit my assumed rendering..
- get eye poses
- get session and check if visible
- get views/etc and render as per my normal
....this is where I'm uncertain
- rt = ovr_GetTextureSwapChainCurrentIndex
- set render target to rt and do tone map pass
- set up layer 0 and put layerMain.ColorTexture[0] = m_oculusTextureSwapChain;
- call ovr_SubmitFrame with the layer ind
Thanks ahead for any help....
- get eye poses
- get session and check if visible
- get views/etc and render as per my normal
....this is where I'm uncertain
- rt = ovr_GetTextureSwapChainCurrentIndex
- set render target to rt and do tone map pass
- set up layer 0 and put layerMain.ColorTexture[0] = m_oculusTextureSwapChain;
- call ovr_SubmitFrame with the layer ind
Thanks ahead for any help....
3 Replies
- galopinHeroic ExplorerThe oculus swap chain is nothing more than a set of surface like any surface you can have in d3d ( with a subset of supported pixel format ).
The only concern with a d3d12 implementation is that the rift SDK is currently buggy, if you try to update more than one OVRSwapchain in a single command list, they do things completely wrong ( one surface is black, one surface contains the render of the other ), you need a command list per ovr surface until they fix it. - CogSimGuyProtegeOk thanks, I will be implementing as a single resource containing both eye views side by side so single command list should be just fine.
- lamour42Expert ProtegeJust a small clarification for anyone getting confused while reading this: You can have as many command lists as you want and execute them in parallel to draw onto your own resources. It is only the last step where you assemble the final image to be rendered(specified in the ovrLayer structure), where you may have problems.
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
- 7 years ago