hecomi / uRaymarching

Raymarching Shader Generator in Unity
http://tips.hecomi.com/entry/2019/01/27/233137
MIT License
1.35k stars 131 forks source link

Stereoscopic VR rendering with RaymarchingRenderer #8

Open andybak opened 7 years ago

andybak commented 7 years ago

Stereo 3D is somehow broken with RaymarchingRenderer (it seems OK with RaymarchingObjects). I can't be sure but I think each eye is getting exactly the same image.

friken commented 6 years ago

this is also an issue w OpenVR... left and right eyes not getting correct images. RaymarchingObjects work but RaymarchingRenderer does not. Note that the Oculus VR driver works fine... the OpenVR does not.

kevinw commented 6 years ago

I used Camera.CalculateFrustumCorners to deal with the different VR setups--OpenVR has oblique frustums, and the difference between single-pass and multi-pass is tricky too. Check out this gist I extracted from my project to see the relevant bits for getting a correct camera ray for each eye--this is the method that worked for me for Oculus, OpenVR, single and multipass.

friken commented 6 years ago

Thanks a TON for this. Just sitting back at dev machine after some coffee and can't wait to fix this vr stereo convergence/eye issue. It has been plaguing me for a good while now.

friken commented 5 years ago

looking at the newest, the forward_modworld_VR works well in my oculus and vive headsets. Is forward required for working VR? Can you take a few and explain the VR fix and any limitations you know of?