Unity-Technologies / BoatAttack

Demo Project using the Universal RP from Unity3D
Other
2.53k stars 950 forks source link

double reflections on water in VR with Oculus Rift #37

Open PJ373 opened 5 years ago

PJ373 commented 5 years ago

I've seen this error in Boat Attack and VR for many versions now of LWRP since 2018. I probably should have reported it sooner. The reflections are split into two images on the water. I'm still getting this error in Unity 2019.1.0f1 with LWRP 5.10.0. I also tried LWRP 5.12.0 with the same effect. I'm using Oculus Integration 1.35. I tried boat attack's custom "ForwardRendererData" and Forward Renderer. Unity XR settings are set to Single Pass stereo rendering mode. I have "Shared Depth Buffer" enabled. Graphics API for Windows is Direct3D11. Color space is Linear. Has anyone testing this with Oculus Rift found a way to remove the split reflection images? And is it still possible to keep some transparency to the water? Thanks in advance for any help on this.

LWRP-Water-Rift

Edit: The screen shot is just the left eye view. So you actually end up in VR with 4 overlapping reflections on the water.

castana1962 commented 5 years ago

Hi PJ373 I have the same problem in both Rift and HTC and the Bugs Unity people are working to fix it Hopefully they can do it asap Regards Alejandro

PJ373 commented 5 years ago

I have the same problem in both Rift and HTC and the Bugs Unity people are working to fix it Hopefully they can do it asap

Hi Alejandro, Can you post the link to the bug, so I can vote on it? If you don't know the bug report number, I'll submit it again. Still broke in Unity 2019.1.0f2 and LWRP 5.13.0. Thanks. Preston

castana1962 commented 5 years ago

Hi PJ373 I add the bug link. https://fogbugz.unity3d.com/default.asp?1141401_35uvevjgqk0o3fr2. Although it stars for other topic , then I added this problem and Unity people told me that it is seeing the case to fix it Hope this help !! Regards Alejandro

PJ373 commented 5 years ago

For those also getting this bug in VR projects for Oculus Rift and HTC VIVE, it is due to a known bug in the scene depth texture in LWRP single pass rendering. This same bug will appear when using the shader graph scene depth node. Please see and vote on this bug because if Unity can fix this for VR users, it will help us get working water shaders, fog effects and lots of other cool things we can do with the scene depth texture in VR. https://issuetracker.unity3d.com/issues/lwrp-vr-shadergraph-scenedepth-doesnt-work-in-single-pass-rendering

jjxtra commented 5 years ago

I don't know if it will help, but you might try https://forum.unity.com/threads/unity-2019-vr-upside-down.674563/

Bortronx commented 5 years ago

I was able to fix the double image by modifying the reflection code in the shader (very ez to fix) and now it looks fine but the depth is still incorrect so not really fixed.