Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VR Support #4

Open
andybak opened this issue Nov 5, 2017 · 2 comments
Open

VR Support #4

andybak opened this issue Nov 5, 2017 · 2 comments

Comments

@andybak
Copy link

andybak commented Nov 5, 2017

I'll try and take a look myself but I'm trying to find a raymarcher that blits directly to the camera that does work in VR to use as an example. Most tend to use a quad parented to the camera.

@hakanai
Copy link

hakanai commented Mar 30, 2018

The alternative being a quad in any position where the vertex shader repositions it at the camera?

@phest
Copy link

phest commented Dec 16, 2018

I think the alternative being the solution used here, which is elegant as hell - blit within OnRenderImage, passing the camera matrix, works perfectly with the scene camera. Thank you for making and tutorial-izing this @Flafla2 <3

Any idea what's missing to make this work in VR? It breaks Single Pass, which may be a complicated fix, but Multi Pass should be easy in theory. In Multi Pass the matrix is slightly off, but symmetrically for each eye, the camera does pass a separate matrix for each.

I wasn't able to find a correct matrix in the APIs. I tested it on a Vive, with Camera.stereoActiveEye, and Camera.GetStereoViewMatrix(StereoscopicEye eye). I wonder if the SteamVR_Camera is doing something different on render. But I'm a bit out of my depth with these SteamVR / open XR APIs. For instance I was able to get a projection matrix from SteamVR (with HMDMatrix4x4ToMatrix4x4(SteamVR.instance.hmd.GetProjectionMatrix(evrEye ...)), but not a view matrix. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants