Forum Discussion
ScottieBizzle
11 years agoExplorer
Why use a 2364x1461 target instead of just reusing 1182x1461
I'm developing a windows-based DX11 shader development tool ( similar to the old NVidia FXComposer ) and am in the process of adding support for my Oculus DK2.
Before the new SDK, I would render the scene from one eye to a larger un-warped half-width target ( 1182 x 1461 ), do some fancy HDR post effects, then warp and copy the result to the left side of the final 1080p swap target, then would render the scene from the other eye to the same ( 1182 x 1461 ) target, run fancy HDR post effects again, then warp and copy it to the right side of the final 1080p swap target.
Now that the new SDK is out, I want to use your built in rendering, but your process is to render the scene from one eye to half of a 2364 x 1461 target, then render the scene from the other eye to the other half, skip post processing ( since it would not trivial to run post effects on this special double-width surface ), then pass that and a final swap chain on so the SDK can do the warping and stuff. Wouldn't it be less wasteful and more straightforward to simply have one 1182 x 1461 and after each eye is rendered, you'd then call an SDK function to do what's in ovrHmd_EndFrame, but only call "hmds->pHSWDisplay->Render(ovrEye_Left, &eyeTexture[ovrEye_Left]);" for the appropriate eye?
This would probably play better with most rendering engines that have some fancy post-processing going on after the scene is rendered and would save you have the memory on that larger texture.
Thanks, love the DK2 by the way!
Scott
Before the new SDK, I would render the scene from one eye to a larger un-warped half-width target ( 1182 x 1461 ), do some fancy HDR post effects, then warp and copy the result to the left side of the final 1080p swap target, then would render the scene from the other eye to the same ( 1182 x 1461 ) target, run fancy HDR post effects again, then warp and copy it to the right side of the final 1080p swap target.
Now that the new SDK is out, I want to use your built in rendering, but your process is to render the scene from one eye to half of a 2364 x 1461 target, then render the scene from the other eye to the other half, skip post processing ( since it would not trivial to run post effects on this special double-width surface ), then pass that and a final swap chain on so the SDK can do the warping and stuff. Wouldn't it be less wasteful and more straightforward to simply have one 1182 x 1461 and after each eye is rendered, you'd then call an SDK function to do what's in ovrHmd_EndFrame, but only call "hmds->pHSWDisplay->Render(ovrEye_Left, &eyeTexture[ovrEye_Left]);" for the appropriate eye?
This would probably play better with most rendering engines that have some fancy post-processing going on after the scene is rendered and would save you have the memory on that larger texture.
Thanks, love the DK2 by the way!
Scott
2 Replies
- jhericoAdventurerYou can't re-use one texture for both the left and right eyes, because the distortion renders both of them at once, right before the buffer swap. The distortion integrates the timewarp matrices in the rendering, which has to be sampled as close as possible to the buffer swap in order to minimize perceived latency.
If you reused the same texture then when you did the distortion for the first eye, the timewarp matrix would still have to predict the pose over at least half of the total frame rendering time.
That said, there's no reason you have to use a single 'double-wide' texture target instead of two textures at the recommended size (1182x1461 for the DK2). All of my examples use two framebuffers, each with their own depth and color attachments. Now it's possible that you might be able to get some very slight performance improvement out of using a single texture and a framebuffer, because you're reducing the number of buffer clears you have to do at the start of rendering, but only at the cost of slight additional complexity in managing the rendering viewport while the framebuffer is active. - ScottieBizzleExplorerGot ya, just watched a video explaining the timewarp stuff, wasn't actually sure what it was till now.
Thanks!
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