ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.02k stars 1.27k forks source link

vr::EVRSubmitFlags::Submit_TextureWithDepth not working #825

Open TheWhiteAmbit opened 6 years ago

TheWhiteAmbit commented 6 years ago

Ok, it is working to submit textures with depth, but they have no effect at all. I can intersect and stencil overlay quad layers on the oculus rift sucessfull. But nothing happens in steam VR. Maybe this has to do with wrong values for the range (VRTextureWithDepth_t - depth.vRange) what is mostly undocumented how to use. All I can find is in the headers a [0..1]

-That could just mean the VRTextureDepthInfo_t range component HmdVector2_t has an array of [2] values -It could mean values should be 0.0f to 1.0f like in the projection matrix -Maybe zNear and zFar are expected

I tried everything with no effect. Why is there always such little documentation that every tiny step ends up in reverse engineering your API? It would be even ok if this feature is in the API but not yet really supported. But it is not ok to have absolutely nothing documented and I have to waste my time on guessing. Sorry for the rant, but this becomes ridiculous!

TheWhiteAmbit commented 5 years ago

Since the oculus rift also has a strange depth offset issue, and I don't expect any help or solution here, I will end up programming my own overlay layer rendering. Shame on both your lousy APIs!

TheWhiteAmbit commented 5 years ago

Ok, refering to the later comments on this #660 issue, it seems everything in OpenVR for Depth-Buffers is only to pass this on to the Oculus API (LibOVR) in case an Oculus is used via OpenVR instead of a HTC Vive.

@aleiby , @JoeLudwig : Would be nice to have this mentioned somewhere in the documentation. Wasted some days to figure out nothing is implemented in OpenVR yet!

BTW, we have this working on LibOVR now (also lousy documentation), and OpenVR with the HTC Vive looks bad compared to the Oculus Rift with Depth Compositing enabled.

TheDeveloperGuy commented 5 years ago

@TheWhiteAmbit I can confirm that this is only currently used for Oculus rendering, as per this comment I received from a Valve dev:

"depth data can be passed by applications such that when it goes through to the Oculus/OVR driver it can participate in their “Oculus Desktop” where controllers and panels take advantage of depth... There are no OpenVR applications outside a sample we wrote which are providing depth."

Documentation is not the strong point of OpenVR. Where to start, there is so much missing...

RonnieViklund commented 5 years ago

Does anyone have an example exactly how to pass depth data to Oculus with Submit_TextureWithDepth? I can't find a single example online, no idea how to implement VRTextureWithDepth_t.